I have problem to convert value from get_all(array) in string(as json) or Map.
RqlCursor cursor = r.db("test").table("x").get_all(arraylist)
when I try to fetch like
for(RqlObject o : cursor) {
if (o instanceof java.util.List<?>) {
List<Object> list = o.getList();
}else if (o instanceof ListIterator<?>) {
List<Object> list = o.getList();
array.add(list);
}else {
java.util.Map<String, Object> map = o.getMap();
}
}
None of other instances than Map
catches above condition and generated error java.util.ArrayList cannot be cast to java.util.Map
How can I get this Object in map or array of list map or even in json formatted string.