I have a php string containing the serialization of a javascript object :
$string = \'{fu:\"bar\",baz:[\"bat\"]}\';
The actual string is fa
I found out that the Yii-framework's CJSON::decode() function handles Javascript objects as well.
CJSON::decode()
If you're not using Yii, you should be able to just use the source code