ZF-4911: Set of "Zend_Json_Exception: Illegal escape sequence 'u'" exceptions

Description

{panel} 5) testJsonSearchContainsWordReturnsArray(Zend_Service_Twitter_SearchTest) Zend_Json_Exception: Illegal escape sequence 'u' /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:386 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:219 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:265 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:180 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:220 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:159 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json.php:74 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Service/Twitter/Search.php:164

6) testJsonSearchRestrictsLanguageReturnsArray(Zend_Service_Twitter_SearchTest) Zend_Json_Exception: Illegal escape sequence 'u' /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:386 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:219 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:265 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:180 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:220 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:159 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json.php:74 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Service/Twitter/Search.php:164

7) testJsonSearchReturnThirtyResultsReturnsArray(Zend_Service_Twitter_SearchTest) Zend_Json_Exception: Illegal escape sequence 'u' /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:386 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:219 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:265 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:180 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:220 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:177 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json/Decoder.php:159 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Json.php:74 /home/cawa/ZendFramework/svn/framework/trunk/library/Zend/Service/Twitter/Search.php:164 {panel}

Comments

This looks like it's likely malformed JSON returned by Twitter. That said, it would be interesting to see if the results change based on whether or not ext/json is used (currently, it's falling back to Zend_Json_Decoder, which means ext/json is not enabled on the test machine.

It's actually Zend_Json issue. it doesn't support '.... \uXXXX....' strings encoding for unicode characters now.

Zend_JsonTest test should be corrected to keep value of Zend_Json::$useBuiltinEncoderDecoder and not to switch between Zend_Json and PHP::json_decode()

Fixed

Changing issues in preparation for the 1.7.0 release.