javascriptjqueryxmljsonformat-conversion

Convert XML to JSON (and back) using Javascript


How would you convert from XML to JSON and then back to XML?

The following tools work quite well, but aren't completely consistent:

Has anyone encountered this situation before?


Solution

  • I think this is the best one: Converting between XML and JSON

    Be sure to read the accompanying article on the xml.com O'Reilly site, which goes into details of the problems with these conversions, which I think you will find enlightening. The fact that O'Reilly is hosting the article should indicate that Stefan's solution has merit.