Skip to content

Commit 64ad624

Browse files
authored
Update README.md
1 parent bef9fce commit 64ad624

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
This is script for Godot Engine, that validate JSON files by JSON Schema.
33

44
# How to use
5-
1.
6-
Create new JSONSchema object in your script (this script automatically register class in Godot ClassDB).
7-
Call its function validate(json_data, json_schema) where
8-
json_data - is your data in string format;
9-
json_schema - is your json_schema in string format.
10-
<br>2.
11-
Use helper class. Create new JSONFile object, open it as it described in ancestor Fire class (and don't forget to close afterall!) use schema_validator field to asigh validator class instance, use json_schema field to assign schema string, use functions load_data() and save_data() to work with your files.
12-
Example:
5+
1. Create new `JSONSchema` object in your script (this script automatically register class in Godot ClassDB).
6+
Call its function `validate(json_data, json_schema)` where
7+
`json_data` - is your data in string format;
8+
`json_schema` - is your json_schema in string format.
9+
<br>2. Use helper class. Create new `JSONFile` object, open it as it described in ancestor `File` class (and don't forget to close afterall!) use `schema_validator` field to asigh validator class instance, use `json_schema` field to assign schema string, use functions `load_data()` and `save_data()` to work with your files.
10+
<br>Example:
1311
```gdscript
1412
var jf := JSONFile.new()
1513
jf.schema_validator = JSONSchema.new()

0 commit comments

Comments
 (0)