title: Force mongodb to output strict JSON
body: <p>I want to consume the raw output of some MongoDB commands in other programs that speak JSON. When I run commands in the mongo shell, they represent <a href="http://docs.mongodb.org/manual/reference/mongodb-extended-json/" rel="noreferrer">Extended JSON</a>, fields in "shell mode", with special fields like <code>NumberLong</code> , <code>Date</code>, and <code>Timestamp</code>. I see references in the documentation to "strict mode", but I see no way to turn it on for the shell, or a way to run commands like <code>db.serverStatus()</code> in things that <em>do</em> output strict JSON, like <code>mongodump</code>. How can I force Mongo to output standards-compliant JSON?</p>
  
  <p>There are <a href="https://stackoverflow.com/questions/5761053/is-there-a-way-to-run-mongodb-shell-or-tojson-method-in-strict-json-mode">several</a> <a href="https://stackoverflow.com/questions/32079600/mongo-db-export-in-json-extended-mode">other</a> <a href="https://stackoverflow.com/questions/11867538/how-can-i-use-python-to-transform-mongodbs-bsondump-into-json">questions</a> on this topic, but I don't find any of their answers particularly satisfactory.</p>