note 76203 deleted from function.json-decode by nlopess

From: Date: Fri, 13 Jul 2007 19:15:39 +0000
Subject: note 76203 deleted from function.json-decode by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-128468@lists.php.net to get a copy of this message
Note Submitter: Erica Tsai ---- Hi, I was running into a weird behavior on our server that caused json_decode() to misinterpret encoded objects. In particular, all strings that had quotes had their quotes escaped somewhere during the encode() process. Then on calling decode(), json barfed. On my local machine, this escaping of quotes didn't occur. Anyone know why? I have the same version of php (5.2.2) running on the server and local machine. The server is hosted by MediaTemple (grid server). I was able to fix this behavior by wrapping stripslashes() around my variables before decoding them.

« previous php.notes (#128468) next »