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

jsonp interface outputs strict JSON format rather than Javascript JSON format

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: HTTP Console
    • None
    • ALL
    • Hide

      Start mongod with rest and jsonp:

      mongod --rest --jsonp
      

      Navigate to page using jsonp:

      http://localhost:28017/_status?jsonp=true
      

      You can tell the JSON is in strict mode, because the dates are represented using objects with "$date" rather than the Javascript "Date" object.

      Show
      Start mongod with rest and jsonp: mongod -- rest --jsonp Navigate to page using jsonp: http: //localhost:28017/_status?jsonp= true You can tell the JSON is in strict mode, because the dates are represented using objects with "$date" rather than the Javascript "Date" object.

      Based on http://docs.mongodb.org/manual/reference/mongodb-extended-json/, the "Javascript" mode is for jsonp, but jsonp actually uses "strict" mode.

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            sverch Shaun Verch
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: