note 77367 added to function.json-encode

From: Date: Sun, 26 Aug 2007 17:43:54 +0000
Subject: note 77367 added to function.json-encode
Groups: php.notes 
Request: Send a blank email to php-notes+get-129820@lists.php.net to get a copy of this message
Obviously, this function has trouble encoding arrays with empty string keys (''). I have just noticed that (because I was using a function in PHP under PHP4). When I switched to PHP5's json_encode, I noticed that browsers could not correctly parse the encoded data. More investigation maybe needed for a bug report, but this quick note may save somebody several hours. Also, it manifests on Linux in 5.2.1 (tested on two boxes), on my XP with PHP5.2.3 json_encode() works just great! However, both 5.2.1 and 5.2.3 phpinfo()s show that the json version is 1.2.1 so might be Linux issue ---- Server IP: 208.69.120.35 Probable Submitter: 194.44.193.103 ---- Manual Page -- http://www.php.net/manual/en/function.json-encode.php Edit -- https://master.php.net/note/edit/77367 Del: integrated -- https://master.php.net/note/delete/77367/integrated Del: useless -- https://master.php.net/note/delete/77367/useless Del: bad code -- https://master.php.net/note/delete/77367/bad+code Del: spam -- https://master.php.net/note/delete/77367/spam Del: non-english -- https://master.php.net/note/delete/77367/non-english Del: in docs -- https://master.php.net/note/delete/77367/in+docs Del: other reasons-- https://master.php.net/note/delete/77367 Reject -- https://master.php.net/note/reject/77367 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129820) next »