Hi Erik, Thanks for your quick resposne. Please find the attached transformation file
which i am using to tranform xml to json response. As i already mentioned same code working good with ML-6 but its not coming as pure json in ML-7. Thanks, Manoj. On Mon, Jul 21, 2014 at 6:28 PM, Erik Hennum <[email protected]> wrote: > Hi, Manoj: > > You might get a more useful response if you provide the transform code. > > Assuming the transform is in XQuery, you can quote with either single or > double quotes, so it might be convenient to use single quotes to wrap the > string with embedded quotes (as in '{"key":"value"}'). > > Alternatives include using the XML " entity or doubling the double > quote, but that would be less readable. > > > Hoping that helps, > > > Erik Hennum > > ------------------------------ > *From:* [email protected] [ > [email protected]] on behalf of manoj viswanadha [ > [email protected]] > *Sent:* Monday, July 21, 2014 4:14 AM > *To:* MarkLogic Developer Discussion > *Subject:* [MarkLogic Dev General] JSON issue with REST API > > Hi all, > > I am facing some issue with json response using ML-7 REST API. > > I am using tranformations using REST API options to convert xml to json. > In ML-6 i am able the get the pure json response but in ML-7 i am getting > JSON response as string. Because of that double quotes (" ") its not coming > as perfect json response. Is there any way to escape these double quotes in > ML-7. > > expected-result: > > {name : "testing"} > > > result in ML-7 rest API: > > "{name:"testing"}" > > > Thanks, > Manoj Viswanadha > Cognizant Technology Solutions > Hyderabad. > > > > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > >
test-json.xqy
Description: Binary data
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
