Shell tojson() shouldn't compact multiple adjacent spaces to one.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      > tojson({withSpaces: '1 2  3   done'})
      { "withSpaces" : "1 2 3 done" }
      

      Here is the broken code: https://github.com/mongodb/mongo/blob/f876d2d71a7c238889c222164571a9e7170ec080/src/mongo/shell/utils.js#L978

      Based on the blame, it looks like we've been doing this basically forever.

            Assignee:
            Unassigned
            Reporter:
            Mathias Stearn
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: