Found the issue. magic_quotes_gpc is enabled and escaping all " with \". This
causes the issue. Have to disable it or use stripslashes function on $json
before decoding.




asagala wrote:
> 
> I am having a weird issue with Zend_JSON:decode function. everything works
> on my local. I run into the issue when running the same code on a
> production box. When I call $json =
> Zend_Json::decode($this->_request->getPost('results')); the returned $json
> is empty. 
> 
> I checked that php json extensions where enabled on the prod box and they
> are. Also have the statement surrounded by try/catch and no exceptions are
> generated. Validated the json in jsonlint and everything is fine. I am out
> of ideas
> 
> Here is the json string I am trying to decode (works on my dev box)
> {"id":"1","real_name":"a","username":"a","password":"","email":"[email protected]","Status":"Active","Created_Date":"2010-01-04
> 18:02:36","Last_Updated":"2010-01-05 00:02:36"}
> 
> Any help would be appreciated.
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/Zend-JSON-issue-tp998788p998791.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to