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

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

css - SVG using textPath a symbol not rendering in Firefox -

order - Notification for user in user account opencart -