jhthorsen / json-validator

:cop: Validate data against a JSON schema
https://metacpan.org/release/JSON-Validator
57 stars 59 forks source link

implement "const" #62

Closed kgoess closed 7 years ago

kgoess commented 7 years ago

added in draft-wright-json-schema-validation-01

http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.24

I wasn't sure what the intent of the error-handling logic was in _validate_type_object, so I just copied the existing code covering "enum". Feel free to correct that or clean it up.

jhthorsen commented 7 years ago

The code is not tidied, but looks good otherwise. I will merge it and do some clean up.

Thanks! 👍