mongodb java driver 3.0: how to store JSON document -
looks basic , simple: have json string , want store in mongodb json document.
in java driver 2.xx use com.mongodb.util.json.parse(string jsonstring)
dbobject , store in collection.
in driver 3.0 json.parse still gives dbobject, rest of api uses org.bson.document class looks incompatible dbobject.
how in driver version 3.0?
for document
use parse()
static helper:
document mydoc = document.parse(jsonstring)
Comments
Post a Comment