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

Shell does not always use extended JSON Shell Syntax

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

      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-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            3 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: