License : MIT
Current version: 1.0
Release date: 2014-06-29
Maven dependency:
<dependency>
<groupId>org.hawksoft</groupId>
<artifactId>json-schema</artifactId>
<version>1.0</version>
</dependency>
json-schema allows you to validate a JSON data document against a given JSON schema.
The JSON schema document follows the exact same structure as the data document it's validating. However, the schema attribute values are actually validation rules.
For example, the following JSON data attribute:
{
...
"fruit" : "banana",
...
}
could be validated using the following schema attribute (rules):
{
...
"fruit" : "type=enum;values=apple,orange,banana,pear",
...
}
Whereas { "fruit" : "banana" } would pass validation, { "fruit" : "strawberry" } would not, since strawberry is not one of the allowed enumeration values for 'fruit'.
Downloads:
0 This Week