What's the proper and reliable way to store an XML string as a JSON property?

Posted by Edwin on Stack Overflow See other posts from Stack Overflow or by Edwin
Published on 2010-05-28T12:28:02Z Indexed on 2010/05/28 12:32 UTC
Read the original article Hit count: 252

Filed under:

Hi Folks,

I want to store a string which itself is an XML string as a property of an JSON object , what's the reliable and proper way of dong this? Should I first encode the XML data into BASE64 first prior saving it to an JSON object, due to the fact that JSON does not support binary data?

Example of data I want to store:

{ "string1" : "...moderately complex XML..." }

Thank you in advance for any hints and suggestions!

© Stack Overflow or respective owner

Related posts about JSON