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

XMLWordPrintableJSON

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

      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
              Reporter:
              Ben Becker (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: