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

Shell REPL doesn't properly print literal objects containing an _id field

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

      The following examples illustrate strange behavior with the shell REPL's handling of objects with an _id field. Note that all of these should be valid, and should print the object itself:

      > {_id:1}
      1
      > {'_id':1}
      2014-02-04T11:51:48.382-0500 SyntaxError: Unexpected token :
      > {"_id":1}
      2014-02-04T11:51:54.014-0500 SyntaxError: Unexpected token :
      > var a = {"_id":1}
      > a
      { "_id" : 1 }
      > var a = {_id:1}
      > a
      { "_id" : 1 }
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            benjamin.becker Ben Becker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: