JSON - is there any XML CDATA equivalent?

user1025852 picture user1025852 · Feb 18, 2013 · Viewed 48.8k times · Source

I'm looking for a way that json parsing will take information as is (as if it was CDATA) - and not to try to serialize that. We use both .net and java (client and server) - so the answer should be about JSON structure Is there any way to achieve this structure?

Thanks.

Answer

almalki picture almalki · Feb 18, 2013

There is no XML CDATA equivalent in JSON. But you can encode your message in a string literal using something like base64. See this question for more details.