Add IndentExtJSON and MarshalExtJSONIndent functions

XMLWordPrintableJSON

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

      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:
            Gabby Asuncion
            Reporter:
            David Bartley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: