Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-213

Extended JSON improvements

    XMLWordPrintable

    Details

    • Type: Epic
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Epic Name:
      BSON to Extended JSON

      Description

      In the Kitura and Vapor examples (SWIFT-210), the result of a MongoDB query is translated to a JSON response via Swift's Codable protocols. This bypasses libmongoc's BSON to JSON conversion. Ideally, converting BSON to JSON through Swift should produce relaxed extended JSON.

      The examples used a simple document with two string fields, so it does not test more complex types (e.g. Binary). Complex types require special JSON respresentation to comply with the extended JSON specs, while Swift's conversion is likely to just encode public properties with no special handling (e.g. converting binary data to a base64 string). We should ensure that relying on Swift's Codables to convert BSON to JSON produces valid relaxed extended JSON (canonical should not be necessary).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jmikola Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: