How to decode a JSON string?

后端 未结 4 652
名媛妹妹
名媛妹妹 2021-01-21 10:39

On the server side do I have 2 hashes I encode into JSON strings like so

my $j = JSON->new;
$j = $j->utf8;

my $data;
$data->{users}  = $j->encode(\\         


        
4条回答
  •  不要未来只要你来
    2021-01-21 11:15

    You should use jQuery.getJSON() as mentioned at http://api.jquery.com/jQuery.getJSON/.

    There is also $.parseJSON() method to parse string to json if you want to go that way.

提交回复
热议问题