I am using the JSON schme validator to validate the JSON String. https://github.com/fge/json-schema-validator
I am following few tutorial to setup the prototype like here http://wilddiary.com/validate-json-against-schema-in-java/
It is running, but I have a question about the validation logic, I am using the data (json data to be validated and json schema) listed at the bottom of this page to test.
http://json-schema.org/example1.html
While I have the following questions:
If I delete any key which is required, like price, the error message only listed this issue, even if I have many other errors like "id is being a String not the Integer as defined in JSON Scheme". How come ?
How can I change the logic of the validation report generation ? like generate all or make them as different level, like error or warning, and customize it ?
What is the good place to create my own validation rule ? is there a way I can make a conditional validation, like if "key-a" = "true" in the json data to be validated, then I want "key-b" = 111, something like that ?
Thanks very much for answering in advanced.