-- mezoni <819...@mail.ru> wrote
(on Monday, 12 January 2009, 03:09 AM -0800):
> Problem not in keys. Problem with UTF.
> Expression may also have contain UTF chars.
> json_encode encode UTF chars in both keys and expression.
> 
> I have question for you.
> Why ZendExprFIndExpr feature enabled by default?
> This will decrease overall performance where this not realy need.
> Why don't turn off this by default?

Agreed -- Ben, turning this on by default would be a BC break; it should
only be turned on if the user needs it.


> By eg.
> class ZendJson
> {
>       public static function encode($valueToEncode, $cycleCheck = false, 
> $options
> = array())
>       {
>               if(isset($options['enableJsonFindExpr']) && 
> $options['enableJsonFindExpr']
> == true) {
>               // here we enable pre-processing js expressions
>       }
> }
> 
> 
> class ZendJsonExpr
> {
>       public static function encode($valueToEncode, $cycleCheck = false, 
> $options
> = array())
>       {
>               // turn this option on
>               $options['enableJsonFindExpr'] == true;
>               return ZendJson::encode($valueToEncode, $cycleCheck, $options);
>       }
> }
> 
> Simple replace code form
> ZendJson::encode($value);
> to
> ZendJsonExpr::encode($value);
> in components that realy need this feature. By e.g. in ZendX_Jquery
> components.
> -- 
> View this message in context: 
> http://www.nabble.com/Recomendation-to-solve-problem-with-ZendJsonExprFinder-in-Zend_Json%3A%3Aencode%28%29-tp21405959p21412476.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

-- 
Matthew Weier O'Phinney
Software Architect       | matt...@zend.com
Zend Framework           | http://framework.zend.com/

Reply via email to