Validating JSON file with YAML schema

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
vogesu
Posts: 1
Joined: Fri Aug 23, 2024 12:45 pm

Validating JSON file with YAML schema

Post by vogesu »

How can I validate a JSON file with a schema encoded in YAML ?If I select "validate with..." myschema.yaml" for my .json example the validator says the schema does not start with "{" which is clear....
florin_nica
Posts: 38
Joined: Wed Sep 09, 2020 3:17 pm

Re: Validating JSON file with YAML schema

Post by florin_nica »

Hello,

Oxygen JSON Editor does not support YAML Schema validation directly. However, you can convert your YAML Schema file to a JSON Schema file using the YAML to JSON converter in the JSON Tools menu. After conversion, you can use the resulting JSON Schema file for the "Validate with..." action. Since YAML Schema is a minor extension of JSON Schema Draft 4, the validation results should be accurate.

Regards,
Florin
Post Reply