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

Error when reading property of JSON that may be null. #72

Closed
chrahunt opened this issue May 16, 2015 · 4 comments
Closed

Error when reading property of JSON that may be null. #72

chrahunt opened this issue May 16, 2015 · 4 comments
Labels

Comments

@chrahunt
Copy link
Collaborator

While reviewing the comment here on #22, I came across a bug where we try to read the properties of a possible null value.

This can be recreated with the following on 2.12.0:

var validator = require('is-my-json-valid');

var validate = validator({
  "type": ["null", "object"],
  "properties": {
    "example": { "type": "string" }
  }
});

validate(null);
@chrahunt chrahunt added the bug label May 16, 2015
@Matt-Esch
Copy link

It seems that is-my-json-valid doesn't respect the type array, I have just run into this bug

@btknorr
Copy link

btknorr commented Jun 2, 2015

This is a show stopper for us...any idea when this will be fixed?

@ghost
Copy link

ghost commented Jul 16, 2015

Submitted a PR here.

@emilbayes
Copy link
Collaborator

This seems to have been resolved with @ghost PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants