Schematron like behavior in json validation?

524 views
Skip to first unread message

Bharani K

unread,
Oct 29, 2014, 6:07:39 AM10/29/14
to json-schem...@googlegroups.com
I would like to know do we have schematron like assertions to be validated in json schema validation? Looks like, the json schema does well like xsd for xml to validate presence of elements. But, can we assert whether an element has "so and so" string?

regards,
Bharani

Francis Galiegue

unread,
Oct 29, 2014, 6:24:59 AM10/29/14
to Bharani K, json-schem...@googlegroups.com
Hello,
Sorry, I don't quite get what you mean. Can you give an example?


--
Francis Galiegue, fgal...@gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/parboiled1/grappa (redde
Caesaris: https://github.com/sirthias)

Arnold Schrijver

unread,
Dec 3, 2014, 8:21:54 AM12/3/14
to json-schem...@googlegroups.com
Hi Bharani,

Yes, JSON Schema can be compared to XML Schema in the XML world. And no, JSON Schema does not have support for schematron-like assertions, just like XML Schema hasn't. This is not part of the standard AFAIK. Such a library would be interesting, but there is no standard for it (again AFAIK).

József Börcsök

unread,
Feb 15, 2016, 9:55:02 AM2/15/16
to json-schema-validator
Hi Arnold,

I'm also interested in a Schematron-like validation framework/standard for JSON documents. Services are described in Swagger (syntax only, similar to XSD for web services) and the goal is to define validation rules that are not backend-specific in a platform-independent descriptor.
Have you found any (standard) solution for it?

Joe
Reply all
Reply to author
Forward
0 new messages