In the publish stream, I need to insert DBObject into the db mongo collection using Java.
I get the object as a String, and this was passed to me from a .NET application that used article.ToBsonDocument().ToJson() in POCO.
On my side of the stream, in Java, I tried just using BasicDBObject doc = (BasicDBObject) JSON.parse(content); but I get com.mongo.util.JSONParseException in Date:
"CreationDate" : ISODate("2013-03-18T08:50:53Z")
I can change the way I create content in C #, and I can change the way I write to the database in java, the only restriction is that it must be passed as a string between two systems.
Any suggestions?
EDIT Thanks to the hint from @Jim Dagg below, some search queries for ISODate and BsonDocument turned out to be this stone , Changing C # code to use
article.ToBsonDocument().ToJson(new JsonWriterSettings{OutputMode = JsonOutputMode.Strict});
fixed it.
source share