RE: XML design for converting to and from JSON?

From
Costello, Roger L. <>
To
"" <>
Date
2014-12-16T21:16:34Z
ID
<>
Thread
RE: XML design for converting to and from JSON?
Hi Folks,

A colleague pointed me to an XML-to-JSON tool:

	There are a bunch of free tools online that already do 
	this - the most frequent one I see cited is this one, which 
	states some principles (and provides configurable options) 
	for how to do the translation.

	http://www.freeformatter.com/xml-to-json-converter.html

I checked out the tool - nice!

For example, it converts this:

<Book id="MCD">
      <Title>Modern Compiler Design</Title>
      <Author>Dick Grune</Author>
      <Publisher>Springer</Publisher>
</Book>

to this:

{
    "@id": "MCD",
    "Title": "Modern Compiler Design",
    "Author": "Dick Grune",
    "Publisher": "Springer"
}

I like that it encodes XML attributes by prefixing the attribute name with the @ symbol.

/Roger