Java – Convert JSON to MongoDB Object

JSON Data to Convert:

{
‘name’ : ‘javac’,
‘age’ : 6
}

Conversion Code:

Output:

{ “_id” : { “$oid” : “4dc9ebb5237f275c2fe4959f”} , “name” : “javac” , “age” : 6}
Done

Comments are closed here.