While using PHP's json_encode to encode an array as a JSON string, the function is specifically cited Any way to stop the value in the returned string? The reason I ask because I need JavaScript to interpret some values in the form of real variables in the object, for example the name of the existing javascript function.
My ultimate goal is to outputted the JSN object to an EXTENS menu component, so the fact that everything was cited, I successfully found the items like "handler" (by clicking on the item handler function) Prevents the item from setting as an array.
What do we do (and this is what You can either use the Zend_Json :: encode () also), the special marker class that encapsulates JavaScript Expressions in a particular category. The encoding again runs through our array-to-ho-encoded, all the markers examples of some strings change. After using the built-in
json_encode () , we change only with
__ toString () related marker to replace each string Example Example
Zend_Json directly (if possible) or customize the code according to your needs.
Comments
Post a Comment