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

New codec options for json_util.dumps and loads

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible

      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

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

              Created:
              Updated:
              Resolved: