note 71740 added to function.json-decode

From: Date: Wed, 13 Dec 2006 19:52:36 +0000
Subject: note 71740 added to function.json-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-120589@lists.php.net to get a copy of this message
Beware when decoding JSON from JavaScript. Almost nobody uses quotes for object property names and none of the major browsers require it, but this function does! {a:1} will decode as NULL, whereas the ugly {"a":1} will decode correctly. Luckily the browsers accept the specification-style quotes as well. ---- Server IP: 216.194.113.175 Probable Submitter: 64.31.160.98 ---- Manual Page -- http://www.php.net/manual/en/function.json-decode.php Edit -- https://master.php.net/note/edit/71740 Del: integrated -- https://master.php.net/note/delete/71740/integrated Del: useless -- https://master.php.net/note/delete/71740/useless Del: bad code -- https://master.php.net/note/delete/71740/bad+code Del: spam -- https://master.php.net/note/delete/71740/spam Del: non-english -- https://master.php.net/note/delete/71740/non-english Del: in docs -- https://master.php.net/note/delete/71740/in+docs Del: other reasons-- https://master.php.net/note/delete/71740 Reject -- https://master.php.net/note/reject/71740 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120589) next »