This code sample demonstrates how to validate a YAML document using JsonParser and JsonReader defined by Jakarta JSON Processing API.
All you need to do for validating YAML documents is just replacing any JSON-P implementation with joy-yaml provided by Joy project, which is another JSON-P implementation, as follows:
<dependency>
<groupId>org.leadpony.joy</groupId>
<artifactId>joy-yaml</artifactId>
<version>${joy.version}</version>
<scope>runtime</scope>
</dependency>Please refer to the Joy project page for its limitations as a YAML processor.
Follow the instructions shown in README in the repository root.
Navigate to the generated target or build directory.
$ ./run.sh <path/to/JSON schema> <path/to/YAML document>