Hi, Gnana: Thanks for the additional detail.
It's still not clear to me, however, why the JSON content (after full conversion to XML) has to be stored with a .xml extension. You can store XML files with other extensions and they will be indexable, searchable, and processable. Have you tried using a different extension -- either .json or, since that might imply the built-in JSON conversion, an extension that doesn't exist in the mimetype mapping table? That approach would be much simpler than writing a resource extension. My other suggestion was only to remove the .xml extension, not the mime types themselves. I should have added that you would always have to specify the Content-Type with the PUT because it could no longer be determined from the extension. Erik Hennum ________________________________________ From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of gnanaprakash.bodire...@cognizant.com [gnanaprakash.bodire...@cognizant.com] Sent: Tuesday, February 03, 2015 11:36 PM To: general@developer.marklogic.com Subject: Re: [MarkLogic Dev General] document rest api with json transformation Hi Eric We are storing only XML files at the moment as ML 6 and Below we have indexing only for XML files. But end user is sending JSON document (Full ML JSON format) which we are transforming to XML in the transform module of PUT request. The XML is validated against schema and then stored with the URI being sent. The URI till now is ending with .xml and content is JSON so we had no issues in ML 6. In ML7, as URI extension is taking more priority to decide the content format our logic is not working any more. I tried removing application/xml mime type but no change. Then I tried removing updating text/xml mime-type by removing xml in the extension, this resulted in new issue where in content is treated as binary in the transform module. We are not able to go ahead with upgrade to ML7 as our existing logic is not working. As you suggested we need to use resource extensions or any other alternative to fix this. Regards, Gnana(GP) 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 http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general