Skip to content

DOCS-4568: updates to extended json page #2209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

schmalliso
Copy link
Contributor

  • clarifies that you need quotes around NumberLong values or
    risk loosing accuracy (numbers can become negative)
  • updates undefined to clarify that it cannot be used in a query
    except by searching using the $type operator

Should probably be back-ported to 2.6


.. code-block:: sh

db.people.insert( { name : Sally, age : undefined } )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that will fail. Sally is a string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL: quotation marks are optional on key names, but not on values.

I quote everything, normally (keys and values). Will update.

- clarifies that you need quotes around NumberLong values or
  risk loosing accuracy (numbers can become negative)
- updates undefined to clarify that it cannot be used in a query
  except by searching using the $type operator

adds quotes around string
@schmalliso
Copy link
Contributor Author

Merged to master and also backported to 2.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants