Skip to content

Commit 337f686

Browse files
committed
readme formatting
1 parent 14a3b8a commit 337f686

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ This will print the following output:
141141
Format validators
142142
-----------------
143143

144-
Starting from version `1.2.0` the library supports the `"format"` keyword (which is an optional part of the specification),
145-
so you can use the following formats in the schemas:
144+
Starting from version `1.2.0` the library supports the [http://json-schema.org/latest/json-schema-validation.html#anchor104](`"format"` keyword)
145+
(which is an optional part of the specification), so you can use the following formats in the schemas:
146146

147147
* date-time
148148
* email
@@ -183,11 +183,11 @@ To bind the `EvenCharNumValidator` to a `"format"` value (for example `"evenleng
183183
to the keyword in the schema loader configuration:
184184

185185
```java
186-
JSONObject rawSchema = new JSONObject(new JSONTokener(inputStream));
187-
SchemaLoader schemaLoader = SchemaLoader.builder()
188-
.schemaJson(rawSchema) // rawSchema is the JSON representation of the schema utilizing the "evenlength" non-standard format
189-
.addFormatValidator("evenlength", new EvenCharNumValidator()) // the EvenCharNumValidator gets bound to the "evenlength" keyword
190-
.build();
191-
Schema schema = schemaLoader.load().build(); // the schema is created using the above created configuration
192-
schema.validate(jsonDcoument); // the document validation happens here
186+
JSONObject rawSchema = new JSONObject(new JSONTokener(inputStream));
187+
SchemaLoader schemaLoader = SchemaLoader.builder()
188+
.schemaJson(rawSchema) // rawSchema is the JSON representation of the schema utilizing the "evenlength" non-standard format
189+
.addFormatValidator("evenlength", new EvenCharNumValidator()) // the EvenCharNumValidator gets bound to the "evenlength" keyword
190+
.build();
191+
Schema schema = schemaLoader.load().build(); // the schema is created using the above created configuration
192+
schema.validate(jsonDcoument); // the document validation happens here
193193
```

0 commit comments

Comments
 (0)