Next in thread →
Next in month →
RE: [xml-dev] RE: XML design for converting to and from JSON?
Michael Steidl wrote: > After a long discussion we refrained from automatically > converting an existing XML data model to JSON. > We learned: an XML-to-JSON tool only is of limited help. Fantastic message Michael! Folks, have you also come to the conclusion that it's better to create a JSON design from scratch rather than auto-convert an existing XML design to JSON? /Roger -----Original Message----- From: Michael Steidl (IPTC) [mailto:] Sent: Thursday, December 18, 2014 10:08 AM To: Costello, Roger L.; Subject: RE: [xml-dev] RE: XML design for converting to and from JSON? Hi all, to throw in a view from a long-time XML user: IPTC - www.iptc.org - builds XML-based news exchange formats for 17 years now and was also challenged to do the same in JSON. After a long discussion we refrained from automatically converting an existing XML data model to JSON: - currently no shared/common way to deal with namespaces in JSON - designs like inline elements don't exist in JSON - the element/attribute model has no corresponding design in JSON - and a basic requirement of JSON users is: no complex data model, please! Therefore we created - a simplified data model for the news exchange in JSON - www.newsinjson.org - compared to the richer but also more complex XML format www.newsml-g2.org - a highly corresponding JSON model to an initial XML model for the rights expression language ODRL as this is a set of data which cannot be simplified: http://www.w3.org/community/odrl/work/json/ vs http://www.w3.org/community/odrl/work/2-0-xml-encoding-constraint-draft-chan ges/ Both approaches were welcome and are used - and we learned: an XML-to-JSON tool only is of limited help. Best, Michael Michael Steidl Managing Director of the IPTC [] International Press Telecommunications Council Web: www.iptc.org - on Twitter @IPTC Business office address: 25 Southampton Buildings, London WC2A 1AL, United Kingdom Registered in England, company no 101096 > -----Original Message----- > From: Costello, Roger L. [mailto:] > Sent: Tuesday, December 16, 2014 10:17 PM > To: > Subject: [xml-dev] 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 > > > __________________________________________________________ > _____________ > > XML-DEV is a publicly archived, unmoderated list hosted by OASIS > to support XML implementation and development. To minimize > spam in the archives, you must subscribe before posting. > > [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ > Or unsubscribe: > subscribe: > List archive: http://lists.xml.org/archives/xml-dev/ > List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
Next in thread →
Next in month →