How to convert bson.Document to valid JSON

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: JSON & ExtJSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Guys

      I did a .Find() and got back a bson.Document, how can I transform this into a valid JSON string?

      I tried .ToExtJSON(false), but this doesn't produce valid JSON, since it doesn't quote new lines and tabs.

       

      Thank you!

              Assignee:
              Unassigned
              Reporter:
              Lucas Pelegrino
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: