I need to JSONize some data without quotes around the values for Javascript purposes.
I am following examples like
$data = array(
'onClick' => new Zend_Json_Expr('function() {'
. 'alert("I am a valid javascript callback '
. 'created by Zend_Json"); }'),
'other' => 'no expression',
);
$jsonObjectWithExpression = Zend_Json::encode(
$data,
false,
array('enableJsonExprFinder' => true)
);
and then returning the $jsonObjectWithExpression, but I get an exception
Fatal error: Call to undefined function Zend_Json_Expr() in ...
I'm pretty sure my version 1.10.8 supports this feature, since I can see the class in json/Expr.php
Do I need to import/include this class somehow? I haven't had to import any other Zend classes..