Re: json_encode() bug

From: Date: Mon, 04 Feb 2008 01:51:59 +0000
Subject: Re: json_encode() bug
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-35156@lists.php.net to get a copy of this message
Like I mentioned before (I think), it should not return an empty string of course because programmatically it's not possible to check for this. As most of our functions return false in those cases, so should this function.
AFAIR false is not valid JSON, so it would break a lot of code. Also, I am not sure we should change json_encode to return false on whole structure if one of the fields contains invalid utf-8. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#35156) next »