No, for better or worse, JSON doesn't have the concept of namespaces as part of the data model like XML. You could capture the XML namespace as a property of the JSON document during transformation or use a naming convention for property names, e.g. "person$firstName". For namespaces that cover the entire document you might also consider a MarkLogic collection, for example,
<person xmlns="http://example.org/ns/person <http://example.org/ns/person>"><first-name>Gnanaprakash</first-name></person> would map to { "firstName": "Gnanaprakash" } in the collection http://example.com/ns/person#Person <http://example.com/ns/person#Person>, capturing the fully namespaced root element. Justin > On May 5, 2015, at 6:12 AM, gnanaprakash.bodire...@cognizant.com wrote: > > Hi > > I am just wondering is there any way we have JSON documents with namespaces. > > When an XML document is converted as JSON we lose the namespaces as JSON > won’t carry namespace > > and we try to covert JSON back to XML, the XML no longer carry the namespace > as the source is JSON. > > Is there any solution for this? > > Regards, > Gnanaprakash Bodireddy > > > > > This e-mail and any files transmitted with it are for the sole use of the > intended recipient(s) and may contain confidential and privileged > information. If you are not the intended recipient(s), please reply to the > sender and destroy all copies of the original message. Any unauthorized > review, use, disclosure, dissemination, forwarding, printing or copying of > this email, and/or any action taken in reliance on the contents of this > e-mail is strictly prohibited and may be unlawful. Where permitted by > applicable law, this e-mail and other e-mail communications sent to and from > Cognizant e-mail addresses may be monitored. > _______________________________________________ > General mailing list > General@developer.marklogic.com > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general