RE: Parsing JSON in EE tag

Can anyone help out here? It seems that since EE uses { and } that it interperets JSON as an EE tag.

I need to pass JSON to a plugin, how is that possible?

3 Answers 3


I 'm wondering if you are preparing JSON data within the template and would like to pass within a plugin via plugin parameter.

Rather than it, just access that object or array within plugin and use PHP's function json_encode

  • Right, that's what I was thinking too after the param didn't work. Simply set the json string to memory, and retrieve it with the plugin and parse the json in the tagdata. It's super simple. Commented Aug 1, 2013 at 15:37
  • No, I'm passing JSON TO the template and trying to pass it to the plugin.
    – MB34
    Commented Aug 1, 2013 at 17:30
  • Can you share the code how you are passing within the template. Also, share how you are getting the JSON data within the template. Commented Aug 1, 2013 at 18:08

Since I figured out that i can pass the javascript object to the template and do my parsing there, I decided to forego messing with the JSON in the template. I still handle the JSON in my plugin but I'm taking the passed parameters and building the JSON from it.

Thanks for the help and comments.


I had the same problem. in my case I store the JSON data in a felid, but before I save it I do php STR_REPLACE {} to <>. while decoding to php array I do reverse the <> to {}. it works fine with me . hope you find this helpful

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.