Re: json_encode/json_decode, take 2
| From: | Jochem Maas | Date: | Fri, 19 Oct 2007 20:59:20 +0000 |
| Subject: | Re: json_encode/json_decode, take 2 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-263427@lists.php.net to get a copy of this message | ||
Christoph Boget wrote:
> The string used below in "$myArrEncoded" is generated in javascript, after
> creating the structure and spitting out:
>
> var JSONVar = javascriptVar.toSource();
>
> I can eval JSONVar and work with it as I would be working with the original
> javascriptVar so I know the transition back and forth from a structure to a
> string isn't causing problems. The problem is when I try to work with the
> string in PHP.
>
> Here is my code:
" is not what you think it is (but that could be my mail client),
and the exterior parentheses are also incorrect. your try/catch block is doing
nothing because neither function throws exceptions.