Hi.
I'm using the MongoDB java driver to pull some data out of a MongoDB collection. I'm having problems converting the resultant DBObject into a processing JSON object. My code looks a little bit like this:
BasicDBObject query = new BasicDBObject("s__UID","123456789");
cursor = coll.find(query);
while(cursor.hasNext())
{
println(cursor.hasNext());
json = getJSONObject(cursor.next());
}
cursor.close();
The Println of cursor.hasNext works fine, but getJSONObject (or loadJSONObject) complain because I'm not passing in strings.
Can anyone help?