Wiki

Clone wiki

snakeyaml-engine / Schemas

Schemas

SnakeYAML Engine implements all the Recommended Schemas, and it allows to define a custom schema.

The examples to use the schemas can be found in the tests

  Load loader = new Load(LoadSettings.builder().setSchema(new CoreSchema()).build());
  Dump dumper = new Dump(DumpSettings.builder().setSchema(new FailsafeSchema()).build());

If you wish to use the !!timestamp tag from the YAML 1.1 spec, you can find an example in the tests.

Updated