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 |