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] Asking for recommendations of xml 2 json open sourceprojects

If you know your XML structure and meaning, then you will always be able to get much better results by writing a custom transformation than you will get from any product working on completely generic XML with unknown semantics. For example, no generic tool is going to be able to guess whether order is important, or whether the names of wrapper elements need to be retained.

Michael Kay
Saxonica

On 14 Dec 2022, at 19:57, Jean Paoli <jeanpa@docugami.com> wrote:

I would love recommendations for xml 2 json open source projects.
 
At Docugami, our reference output format is xml. We want to be able to recommend an xml 2 json transform (our xml represents documents, it has mixed content and ordering is important). We are looking at http://www.jsonml.org/ and https://www.newtonsoft.com/json/help/html/ConvertingJSONandXML.htm. There are issues with both and we are trying to avoid writing our own.
 
I think we slightly prefer the newtonsoft approach because they do not generate arrays systematically. With newtonsoft, elements remain unchanged, attributes are prefixed with an @ but multiple nodes with the same name at the same level are grouped together into an array which means that ordering is changed, specially compounded when you add mixed content.  Is there an open source package that mimics newtonsoft but does not group multiples nodes with the same name and also creates say a text node for each text in the mixed content case? Or are there other approaches recommended?
 
Thank you in advance !
 
-Jean



[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