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

New codec options for json_util.dumps and loads

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

      Description

      MongoDB 2.6 shipped a rewritten mongoexport that changed, in a backward breaking way, the MongoDB Extended JSON format for a number of BSON types. most notably BSON datetime (2.6 outputs $date in ISO-8601 format) and BSON int64 (now exported as $numberLong). There have been a number of other requests to make dumps configurable in other ways. See these tickets:

      PYTHON-1103
      PYTHON-767
      Github PR-297
      Github PR-295

      This ticket tracks the addition of support to configure the output of json_util.dumps and loads. Things that should be configurable:

      • support for ordereddict output in loads
      • aware / naive datetimes in loads
      • datetime in ISO-8601 format for dumps
      • bson.int64.Int64 output to $numberlong for dumps
      • UUID output to $binary and support for UUIDRepresentation in dumps and loads

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shane.harvey Shane Harvey
              Reporter:
              behackett Bernie Hackett
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: