I have
$string = $_REQUEST['COM_node'];
it contains the string
{"cmp_class":"ProfileReferences","auto_id":"cmp14","forms":[],"parent":{"cmp_class":"PrivateMediaNetworkList","auto_id":"httpdoc"}}
When I tried
$nodeArray = json_decode($string, true);
returns NULL. But when I given like
$string = '{"cmp_class":"ProfileReferences","auto_id":"cmp14","forms":[],"parent":{"cmp_class":"PrivateMediaNetworkList","auto_id":"httpdoc"}}';
$nodeArray = json_decode($string, true);
It works fine. I searched the web, but found no solution.