JSON Schema validator

An asset by sahedo.studio
The page banner background of a mountain and forest
JSON Schema validator hero image

Quick Information

0 ratings
JSON Schema validator icon image
sahedo.studio
JSON Schema validator

This is script for Godot Engine, that validate JSON files by JSON Schema.

Supported Engine Version
3.1
Version String
1.1
License Version
MIT
Support Level
community
Modified Date
3 years ago
Git URL
Issue URL

JSON-Schema-validator

This is script for Godot Engine, that validate JSON files by JSON Schema.

How to use

  1. Create new JSONSchema object in your script (this script automatically register class in Godot ClassDB). Call its function validate(json_data, json_schema) where json_data - is your data in string format; json_schema - is your json_schema in string format.
  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.

Example:

    var jf := JSONFile.new()
    jf.schema_validator = JSONSchema.new()
    jf.json_schema = to_json(some_schema_dictionary)
    jf.open("user://some_data.txt", File.WRITE)
    my_data = jf.load_data() #if my_data turned to String, check if it is error message
    jf.close()

Links

More about schemas and validation here: https://json-schema.org

This is script for Godot Engine, that validate JSON files by JSON Schema.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
JSON Schema validator icon image
sahedo.studio
JSON Schema validator

This is script for Godot Engine, that validate JSON files by JSON Schema.

Supported Engine Version
3.1
Version String
1.1
License Version
MIT
Support Level
community
Modified Date
3 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers