Fix bug with json-schema and many constraints
Add some more tests for json-schema function