json-schema: treat undefined
values as if they were not present.
#208
Labels
enhancement
New feature or request
undefined
values as if they were not present.
#208
It would be nice to have the option to treat undefined values as if they were not present, so a schema like
would match objects like
{"foo": undefined}
in addition to{}
(since thefoo
key will be omitted when the object is serialized to JSON.As a workaround, I'm doing
JSON.parse(JSON.stringify(obj))
whenobj
may haveundefined
keys, which is less than ideal.The text was updated successfully, but these errors were encountered: