|
12 | 12 | * [Resolution scopes](#resolution-scopes)
|
13 | 13 |
|
14 | 14 |
|
15 |
| -This project is an implementation of the [JSON Schema Core Draft v4](http://json-schema.org/latest/json-schema-core.html) specification. |
| 15 | +This project is an implementation of the [JSON Schema Core Draft v4][draft-zyp-json-schema-04] specification. |
16 | 16 | It uses the [org.json API](http://stleary.github.io/JSON-java/) (created by Douglas Crockford) for representing JSON data.
|
17 | 17 |
|
18 | 18 | # When to use this library?
|
19 | 19 |
|
20 | 20 | Lets assume that you already know what JSON Schema is, and you want to utilize it in a Java application to validate JSON data.
|
21 |
| -But - as you may have already discovered - there is also an [other Java implementation](https://github.com/fge/json-schema-validator) |
| 21 | +But - as you may have already discovered - there is also an [other Java implementation][daveclayton/json-schema-validator] |
22 | 22 | of the JSON Schema specification. So here are some advices about which one to use:
|
23 |
| - * if you use Jackson to handle JSON in Java code, then fge/json-schema-validator is obviously a better choice, since it |
24 |
| -uses Jackson |
| 23 | + * if you use Jackson to handle JSON in Java code, then [daveclayton/json-schema-validator] is obviously a better choice, since it uses Jackson |
25 | 24 | * if you want to use the [org.json API](http://www.json.org/java/) then this library is the better choice
|
26 | 25 | * if you want to use anything else for handling JSON (like GSON or javax.json), then you are in a little trouble, since
|
27 | 26 | currently there is no schema validation library backed by these libraries. It means that you will have to parse the JSON
|
28 | 27 | twice: once for the schema validator, and once for your own processing. In a case like that, this library is probably still
|
29 |
| -a better choice, since it seems to be [twice faster](https://github.com/erosb/json-schema-perftest) than the Jackson-based fge |
30 |
| -library. |
| 28 | +a better choice, since it seems to be [twice faster](https://github.com/erosb/json-schema-perftest) than the Jackson-based [daveclayton][daveclayton/json-schema-validator] library. |
31 | 29 |
|
32 | 30 |
|
33 | 31 | ## Maven installation
|
@@ -165,7 +163,7 @@ following keys:
|
165 | 163 | ## Format validators
|
166 | 164 |
|
167 | 165 |
|
168 |
| -Starting from version `1.2.0` the library supports the [`"format"` keyword](http://json-schema.org/latest/json-schema-validation.html#anchor104) |
| 166 | +Starting from version `1.2.0` the library supports the [`"format"` keyword][draft-fge-json-schema-validation-00 format] |
169 | 167 | (which is an optional part of the specification), so you can use the following formats in the schemas:
|
170 | 168 |
|
171 | 169 | * date-time
|
@@ -235,3 +233,6 @@ SchemaLoader schemaLoader = SchemaLoader.builder()
|
235 | 233 | [ASL 2.0]: https://www.apache.org/licenses/LICENSE-2.0
|
236 | 234 | [Travis badge master]: https://travis-ci.org/everit-org/json-schema.svg?branch=master
|
237 | 235 | [Travis]: https://travis-ci.org/everit-org/json-schema
|
| 236 | +[daveclayton/json-schema-validator]: https://github.com/daveclayton/json-schema-validator |
| 237 | +[draft-zyp-json-schema-04]: https://tools.ietf.org/html/draft-zyp-json-schema-04 |
| 238 | +[draft-fge-json-schema-validation-00 format]: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-7 |
0 commit comments