Skip to content

Commit f59e9fc

Browse files
committed
get JsonSchema from JsonNode in JsonSchemaFactory
1 parent 39ba04b commit f59e9fc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.networknt</groupId>
55
<artifactId>json-schema-validator</artifactId>
6-
<version>0.1.0</version>
6+
<version>0.1.1</version>
77
<description>A json schema validator that supports draft v4</description>
88
<url>https://github.com/networknt/json-schema-validator</url>
99
<name>JsonSchemaValidator</name>

src/main/java/com/networknt/schema/JsonSchemaFactory.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,8 @@ public JsonSchema getSchema(URL schemaURL) {
5252
}
5353
}
5454

55+
public JsonSchema getSchema(JsonNode jsonNode) {
56+
return new JsonSchema(mapper, jsonNode);
57+
}
58+
5559
}

0 commit comments

Comments
 (0)