XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
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 [mdirector@iptc.org]
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:costello@mitre.org]
> Sent: Tuesday, December 16, 2014 10:17 PM
> To: xml-dev@lists.xml.org
> 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: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS