Skip to content

Instantly share code, notes, and snippets.

@vroy
Created May 3, 2013 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vroy/5510758 to your computer and use it in GitHub Desktop.
Save vroy/5510758 to your computer and use it in GitHub Desktop.
Keys with an undefined value are not included in JSON.stringify? http://cl.ly/image/3c0U000Z2m20 I know that undefined is not the same as null, but I find it odd nonetheless.
> var x = { foo: undefined }
undefined
> x
Object {foo: undefined}
> JSON.stringify(x)
"{}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment