The Java API provide most of the time access to the JSON document (as string):
- get commands
- view command using the ViewRow.getDocument
When we call a view the result is a ViewResponse, but it is not possible to get the JSON document out of it, and the view engine returned a JSON doc.
It could be interesting for some development, to be able to do a viewResponse.toJSON() that returns the exact result of the view. (this function may not be compliant with the includesDoc(true) option)
The use case is simple, suppose I am creating a REST API and I would like to call the view and return the result to the user it would be good to do something like :
public String getPersons( )
Today I have to loop on each result and create a new object/document