Pagination and JSON encoding of Ming query cursors