-
Type:
Task
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
xiangjinwu has created [PR #519: feat(extjson): parse legacy `
{"$date": <ms since epoch>}`|https://github.com/mongodb/bson-rust/pull/519] in bson-rust
Issue Text:
According to the specification, there exists a legacy Extended JSON form of Datetime
https://github.com/mongodb/specifications/blob/master/source/extended-json/extended-json.md#datetime
> Mongoexport 2.4 and the Java driver always transform a Datetime object into an Extended JSON string of the form `
`. This form has the problem of a potential loss of precision or range on the Datetimes that can be represented.
Specially, this legacy form is called `JsonMode.STRICT` in the Java `JsonWriterSettings`, while the canonical form is `JsonMode.EXTENDED`. The former is still used by the Debezium connector for MongoDB.
This PR adds the ability to parse such legacy format, without conflicting with the standard ones.