note 71740 deleted from function.json-decode by googleguy
| From: | googleguy@php.net | Date: | Fri, 30 Nov 2012 05:51:36 +0000 |
| Subject: | note 71740 deleted from function.json-decode by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-192225@lists.php.net to get a copy of this message | ||
Note Submitter: Adrian Ziemkowski
----
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.