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.
JSON and XML are “self describing” nature. JSON and XML are hierarchical. We can parse JSON and XML.
JSON is just a encoding for objects, and you can't really send the implementation-dependent binary structure get around some parse function.
CDATA stands for Character Data and it means that the data in between these strings includes data that could be interpreted as XML markup, but should not be. The key differences between CDATA and comments are: As Richard points out, CDATA is still part of the document, while a comment is not.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With