Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6893

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

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

      > 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 Unassigned
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: