note 84624 added to function.json-decode

From: Date: Tue, 22 Jul 2008 15:22:21 +0000
Subject: note 84624 added to function.json-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-142500@lists.php.net to get a copy of this message
FWIW, the code behind json_decode is using an overly strict interpretation of the JSON spec. If you're feeding json encoded from the browser and the object keys (or member names in JSON terms) are not quoted, json_decode fails. So, if you're hoping to parse JSON that also can be properly handled by Javascript's eval, you're going to have to use another tool. I'm usuing the json toolkit in xml-rpc for php (check sourceforge) quite successfully. This seems like a bug to me, but when I reported it as a bug (#45563), it was marked bogus. ---- Server IP: 64.71.164.2 Probable Submitter: 75.151.84.241 ---- Manual Page -- http://www.php.net/manual/en/function.json-decode.php Edit -- https://master.php.net/note/edit/84624 Del: integrated -- https://master.php.net/note/delete/84624/integrated Del: useless -- https://master.php.net/note/delete/84624/useless Del: bad code -- https://master.php.net/note/delete/84624/bad+code Del: spam -- https://master.php.net/note/delete/84624/spam Del: non-english -- https://master.php.net/note/delete/84624/non-english Del: in docs -- https://master.php.net/note/delete/84624/in+docs Del: other reasons-- https://master.php.net/note/delete/84624 Reject -- https://master.php.net/note/reject/84624 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#142500) next »