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

Implicit missing keys in object #574

Merged
merged 6 commits into from
Oct 6, 2020
Merged

Conversation

nvie
Copy link
Owner

@nvie nvie commented Oct 5, 2020

Makes all decoders from the object family (object(), exact() and inexact()) return optional fields as implicit-undefined rather than explicit-undefined. This allows spreading the results of these values into an object with default values.

Fixes #573.

@nvie nvie self-assigned this Oct 5, 2020
@nvie nvie force-pushed the implicit-missing-keys-in-object branch from 1318779 to fb4365d Compare October 5, 2020 14:07
- When known/allowed field, use implicit-undefined behavior
- When unknown field, just pass on whatever there is in the input (i.e.
  keep explicit-undefined if it's there)
@nvie nvie merged commit 6d76bff into master Oct 6, 2020
@nvie nvie deleted the implicit-missing-keys-in-object branch October 6, 2020 20:55
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.

Decoder creates object property with undefined value
1 participant