We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcada9f commit fa31c41Copy full SHA for fa31c41
json-schema-validator-objects/README.md
@@ -0,0 +1,19 @@
1
+# JSON schema object wrapper
2
+
3
+This module allows wrapping Kotlin objects (e.g. Map, List, primitives) to `AbstractElement` that can be validated by JSON schema.
4
5
+## Usage
6
7
+```kotlin
8
+val schema = JsonSchema.fromDefinition(/*schema*/)
9
10
+val obj = mapOf(
11
+ "a" to 42,
12
+ "b" to listOf("test"),
13
+ "c" to mapOf(
14
+ "inner" to 42,
15
+ ),
16
+)
17
18
+val result = schema.validate(wrapAsElement(obj), OutputCollector.flag())
19
+```
0 commit comments