Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2046

Change default JSONMode from LEGACY to RELAXED

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0
    • Affects Version/s: None
    • Component/s: JSON
    • Labels:
      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.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: