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

Number comparison doesn't work in all cases #149

Closed
Stranger6667 opened this issue Dec 8, 2020 · 0 comments · Fixed by #152
Closed

Number comparison doesn't work in all cases #149

Stranger6667 opened this issue Dec 8, 2020 · 0 comments · Fixed by #152

Comments

@Stranger6667
Copy link
Owner

Schema:

{"enum": [0.0]}

Value 0 should be valid, since equality is defined as:

Two JSON instances are said to be equal if and only if they are of the same type and have the same value according to the data model. Specifically, this means:

both are null; or
both are true; or
both are false; or
both are strings, and are the same codepoint-for-codepoint; or
both are numbers, and have the same mathematical value; or
both are arrays, and have an equal value item-for-item; or
both are objects, and each property in one has exactly one property with a key equal to the other's, and that other property has an equal value.

But currently, it is rejected

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 a pull request may close this issue.

1 participant