Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-946

Add IndentExtJSON and MarshalExtJSONIndent functions

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.8.0
    • Affects Version/s: None
    • Component/s: BSON

      Add functions to marshal to pretty printed Extended JSON and to directly marshal to pretty printed Extended JSON.


      Original Issue:

      Currently, trying to call json.Marshal on a bson.D results in the document being marshalled as a standard array of structs; i.e. you end up with a JSON array of documents containing "Key" and "Value".

      I'm aware that the go driver also supports encoding to extended JSON, and that does work, but it's not as usable because it doesn't support indenting/pretty-printing.

            Assignee:
            gabriela.asuncion@mongodb.com Gabby Asuncion
            Reporter:
            bartle David Bartley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: