[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: XML design for converting to and from JSON?
- From: "Costello, Roger L." <costello@mitre.org>
- To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Tue, 16 Dec 2014 21:16:34 +0000
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
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]