Skip to content

Conversation

@polpo
Copy link

@polpo polpo commented Oct 22, 2015

This is an issue that arises when validating JS objects rather than objects that have come straight from JSON. Properties that are undefined should be treated as if they had undergone a JSON stringify/parse roundtrip: they should be considered invisible when doing validation. This matches the behavior of other JSON Schema validators that I have tested.

I understand if you disagree with this stance. Perhaps you wish to treat data that would not be expressible as JSON as not being valid.

This is an issue that arises when validating JS objects rather than objects
that have come straight from JSON. Properties that are undefined should be
treated as if they had undergone a JSON stringify/parse roundtrip: they should
be considered invisible when doing validation. This matches the behavior of
other JSON Schema validators that I have tested.
@polpo
Copy link
Author

polpo commented Oct 22, 2015

I just realized that this is a dupe of #175.

@drom
Copy link

drom commented Apr 28, 2017

@geraintluff this is important fix. Could you please merge it?

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