Hi all,
I’m trying to create a plugin that outputs JSON, however, since JSON looks like EE tags, they’re being parsed. For instance, if my plugin outputs this:
[{title: "hello", body: "body"},{title: "Hello2", body: "body2"}]The rendered template ends up looking like this, because it interprets the {} parts as tags:
[,]How can I get EE to not parse this section? I feel there’s probably some super simple way around this, but I just haven’t found it.
-Kyle
change the format so that the closing brackets are on a different line from the opening brackets.
Thanks for the reply. Unfortunately, the way I’m currently doing it is using PHP’s json_encode(), so I don’t really have any control over how it’s outputted. I guess I could switch to generating it myself, but if there’s a way to work around it using json_encode(), that’d be best.
-Kyle
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.