-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: JSON
-
None
-
Major Change
The Extended JSON spec says:
An Extended JSON generator (hereafter just "generator") produces strings in an Extended JSON format.
A generator MUST allow users to produce strings in either the Canonical Extended JSON format or the Relaxed Extended JSON format. If generators provide a default format, the default SHOULD be the Relaxed Extended JSON format.
A generator MAY be capable of exporting strings that adhere to other formats, such as Legacy Extended JSON formats.
Our current default is JSONMode.LEGACY. We should change that to JSONMode.RELAXED in PyMongo 4.0 to adhere to the spec.
We also need to raise some kind of warning when users of PyMongo 3.X use the default JSONMode, eg "JSONOptions()" or DEFAULT_JSON_OPTIONS.