How to get JSON output from Cloudant CouchDB?
I'm new to cloudant and still figuring out various APIs that it provides for access and retrieval.
So far, I've used findbyIndex using selector string which returns JSON as de-serialised object of the POJO supplied.
For a certain use case which I'm working- I need to get JSON only and not the de-seralised object. Is there any way or API from which I can get the actual cloudant doc as JSON only ?
If you know the ID of the document you want to read only the raw JSON, you can use the find method to get the raw inputstream from the request. Currently using the findByIndex method you can only get a deserialised java object back, so you could always use a Map object for your POJO. Although that being said it might be possible to pass the type String for the class to deserialise, however I have not tested this.