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

Shell does not always use extended JSON Shell Syntax

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: 3.1.3
    • Fix Version/s: Backlog
    • Component/s: Shell
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: