Shell does not always use extended JSON Shell Syntax

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.1.3
    • Component/s: Shell
    • Server Tooling & Methods
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      For most types, the shell prints values in extended JSON shell mode, which is why we have the shell mode flavor of eJSON in the first place (shell can parse the output again).

      However, for MinKey and MaxKey (at least), this is not the case, and the shell instead prints out the strict syntax.

      MongoDB shell version: 3.1.3
      connecting to: test
      Server has startup warnings:
      2015-06-27T16:39:10.891+1000 I CONTROL  [initandlisten]
      2015-06-27T16:39:10.891+1000 I CONTROL  [initandlisten] ** NOTE: This is a development version (3.1.3) of MongoDB.
      2015-06-27T16:39:10.892+1000 I CONTROL  [initandlisten] **       Not recommended for production.
      2015-06-27T16:39:10.892+1000 I CONTROL  [initandlisten]
      > Timestamp(3, 5)
      Timestamp(3, 5)
      > DBRef("foo", "bar")
      DBRef("foo", "bar")
      > MinKey
      { "$minKey" : 1 }
      > MaxKey
      { "$maxKey" : 1 }
      

      I'd expect the shell to print out MinKey and MaxKey instead.

            Assignee:
            Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            Thomas Rueckstiess (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: