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

Change default JSONMode from LEGACY to RELAXED

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.0
    • JSON
    • None
    • Major Change

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: