@@ -2,7 +2,22 @@ JSON Schema Validator
2
2
=====================
3
3
4
4
This project is an implementation of the [ JSON Schema Core Draft v4] ( http://json-schema.org/latest/json-schema-core.html ) specification.
5
- It uses the [ org.json API] ( http://www.json.org/java/ ) for representing JSON data.
5
+ It uses the [ org.json API] ( http://www.json.org/java/ ) (created by Douglas Crockford) for representing JSON data.
6
+
7
+ When to use this library?
8
+ -------------------------
9
+ Lets assume that you know what JSON Schema is, and you want to utilize it in a Java application to validate JSON data.
10
+ But - as you may have already discovered - there is also an [ other Java implementation] ( https://github.com/fge/json-schema-validator )
11
+ of the JSON Schema specification. So here are some advices about which one to use:
12
+ * if you use Jackson to handle JSON in Java code, then fge/json-schema-validator is obviously a better choice, since it
13
+ uses Jackson
14
+ * if you want to use the [ org.json API] ( http://www.json.org/java/ ) then this library is the better choice
15
+ * if you want to use anything else for handling JSON (like GSON or javax.json), then you are in a little trouble, since
16
+ currently there is no schema validation library backed by these libraries. It means that you will have to parse the JSON
17
+ twice: once for the schema validator, and once for your own processing. In a case like that, this library is probably still
18
+ a better choice, since it seems to be [ 4x faster] ( https://github.com/erosb/json-schema-perftest ) than the Jackson-based fge
19
+ library.
20
+
6
21
7
22
Maven installation
8
23
------------------
@@ -12,7 +27,7 @@ Add the following to your `pom.xml`:
12
27
<dependency >
13
28
<groupId >org.everit.json</groupId >
14
29
<artifactId >org.everit.json.schema</artifactId >
15
- <version >1.1.0 </version >
30
+ <version >1.1.1 </version >
16
31
</dependency >
17
32
```
18
33
0 commit comments