Are there any strict rules for converting between JSON and XML?
The program I'm working on should be able to output the results in both formats, but among all the possible conversion utilities, libraries, etc. I could not understand if there was any standard (possibly de facto) for this conversion.
Common problems, as I see it, are the following:
conversion from one format to another, and then back should give a result identical to the original;
JSON has arrays - a simple nesting of such child elements in XML will not be executed, since some XML processing tools did not preserve order;
XML has attributes - representing them as children will change the source XML when the transformation is inverse.
Is it possible to find any documentation on this issue - or can I use any suitable converter, because there is no such standard?
Thank you in advance for links, tips, recommendations.
source share