Skip to content


PHP json_encode() and Flex JSON.decode Gotcha

I came across a little ‘gotcha’ when trying to get Flex JSON.decode to properly decode a JSON string I was producing with PHP.

The one of the elements in the string contained ‘ &quote; ‘ which when being encoded by php and sent as a HTTPService response back to my Flex application was being converted back into double quotes ( ). When Flex JSON.decode attempted to decode the string it would silently fail. No errors or anything.

In my case my JSON string was already pretty complicated with lots of variable content so it took a while to figure this out. Hopefully someone else finds this post and saves themselves some time.

Posted in Code, PHP.

Tagged with , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.



close