Menu

#121 Roundtrip XML->Json->XML

open
nobody
None
5
2011-05-25
2011-05-25
No

I try to restore XML from Json, previously converted from XML. (don't ask why)

XML-in
<table><body><line><ccc/><bbb/><aaa/></line></body></table>

jsonString = {"body": {"line": {
"ccc": [],
"bbb": [],
"aaa": []
}}}

XML-out
<table><body><line><aaa/><bbb/><ccc/></line></body></table>

In the XML-out, the order of the aaa,bbb,ccc-tags is not correct, as the names get sorted on the way (XMLSerializer.java line 942).
For Json or beans, the order may not be important, but it is for XML.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.