-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: JSON
-
None
-
Environment:Windows 10
Code:
static String dateStr = "{ \"name\" : \"Bruce Lee\", \"age\" : 100, \"LossDate\":{\"$date\":'1970-01-01'}}";
Document doc = Document.parse(dateStr);
org.bson.json.JsonParseException: Failed to parse string as a date
at org.bson.json.JsonReader.visitDateTimeExtendedJson(JsonReader.java:1057)
at org.bson.json.JsonReader.visitExtendedJSON(JsonReader.java:618)
at org.bson.json.JsonReader.readBsonType(JsonReader.java:148)
at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:149)
at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:45)