Deanna Bonds wrote:
Benjamin Eberlei wrote:
Have you enabled the enableJsonExprFinder option?

http://framework.zend.com/manual/en/zend.json.advanced.html#zend.json.advanced.expr

you have to add the option:

$jsonObjectWithExpression = Zend_Json::encode(
    $data,
    false,
    array('enableJsonExprFinder' => true)
);

How would one do that using the context switcher? I don't call Zend_Json::encode directly, the context switcher does.

If it doesn't work through the context switcher, I might can set up a callback on the json context and chain the existing method and set up a post processor for it. Then in the code have something like array( 'handler' => array('somewildtagname' => 'javascript code') Then in the post processor do a regex for that string and remove it and the quotes around the javascript code. Have to investigate the possibility of chaining the json context output though.

Reply via email to