When to use this
Use this path when your payload file is JSON (not YAML).
Steps
- Place the JSON payload on disk.
- Place the schema file on disk (
.json,.yml, or.yaml). - Execute the effect:
validate json "plugins/Schema-Validator/data/player.json" using schema "plugins/Schema-Validator/schemas/player.schema.json"
set {_errors::*} to last schema validation errors
- Branch by result size:
if size of {_errors::*} is 0:
broadcast "Validation passed"
else:
loop {_errors::*}:
broadcast "- %loop-value%"
Operational notes
- Pattern index in
EffValidateData.init()controls YAML vs JSON mode. - Data loading is delegated to
DataFileLoader.load(path, yamlMode). - Current loader deserializes JSON root as
Map<String, Object>in this Skript path.
Related pages
- Syntax and runtime semantics: Skript API
- Rule processing details: Validation behavior