I need to retrieve all the documents for a couchdb in a sequential manner. I'm trying to use the pagination as follow, but I get the error message below:
Page<JsonObject> page = dbClient.view("_all_docs").includeDocs(true).queryPage(10,null,JsonObject.class);
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT
However, when I run the line below, it works fine:
List<JsonObject> allDocs = dbClient.view("_all_docs").includeDocs(true).query(JsonObject.class);
What class name should I use for the queryPage function. Documents are stored in the database as Json objects.
Thanks in advance for your help.