Skip to content
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

Handle JSON.stringify(undefined) #1783

Merged
merged 1 commit into from
Sep 25, 2019

Conversation

alexcrichton
Copy link
Contributor

Turns out that JSON.stringify(undefined) doesn't actually return a
string, it returns undefined! If we're requested to serialize
undefined into JSON instead just interpret it as null which should
have the expected semantics of serving as a placeholder for None.

Closes #1778

Turns out that `JSON.stringify(undefined)` doesn't actually return a
string, it returns `undefined`! If we're requested to serialize
`undefined` into JSON instead just interpret it as `null` which should
have the expected semantics of serving as a placeholder for `None`.

Closes rustwasm#1778
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.

JsValue::into_serde raises an error when called with undefined
1 participant