2013-05-02 14 views

risposta

28

com.mongodb.util.JSON ha un metodo di analisi.

BasicDBObject implementa DBOBJECT

Object o = com.mongodb.util.JSON.parse("Your JSON structure or JSONObj.toString()"); 
DBObject dbObj = (DBObject) o; 
0
com.mongodb.util.JSON.parse 

è deprecato

Dopo la versione 3.6.1 uso:

String json = "{"name": "joe"}"; 
Object o = BasicDBObject.parse(json); 

Seguire qui: deprecated-list