Hello, Benjamin!

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?

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.

Reply via email to