JSON/YAML providers
There is an abstraction layer above JSON/YAML structure that allows usage with different JSON libraries. There are just two interfaces in this layer:
There are many adapter/provider classes for most common JSON/YAML libraries, all of them can be found in the subpages or in this package.
Custom providers
Using multiple providers
Generally, mixing up providers is not recommended, but it may make sense when you want to use different formats (JSON, YAML) for different things (schema, instance parsing). There is a special API for such a use case:
new ValidatorFactory().withJsonNodeFactories(schemaNodeFactory, instanceNodeFactory);
04 August 2025