Issue Type: Bug Created: 2009-12-22T15:48:17.000+0000 Last Updated: 2011-08-20T12:40:13.000+0000 Status: Open Fix version(s): Reporter: Pádraic Brady (padraic) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Json
Related issues: - ZF-8619
In JSON, the presence of invalid Unicode should produce an error. In the case of PHP's ext/json it instead returns NULL (presumably to avoid unnecessary errors). Zend_Json_Encoder, the PHP native implementation used either by choice or in the absence of ext/json does neither, instead pulling out what appears to be a codepoint reference. This gives rise to invalid JSON strings in that such refs are lost and presented as literal characters.
<pre class="highlight">require_once 'Zend/Json/Encoder.php'; $source = <<
Expected (as per ext/json):
No comments to display
Have you found an issue?
See the Overview section for more details.