Skip to content

Custom SnakeYAML Constructor and RecordUtils for deserializing Java records.

License

Notifications You must be signed in to change notification settings

The-Java-Druid/yamlrecords

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java CI with Maven

Publish package to GitHub Packages

Record-YAML-Snakeyaml

Custom SnakeYAML Constructor and RecordUtils for deserializing Java records.

Features

  • Instantiate records (JDK 17+) via SnakeYAML
  • Supports nested records, collections, Map<String, Record>
  • Handles Optional<T> and primitive coercion

Latest version

GitHub Release

Usage

<dependency>
  <groupId>org.yaml.snakeyaml</groupId>
  <artifactId>yamlrecords</artifactId>
  <version>1.0.7</version>
</dependency>
Yaml yaml = new Yaml(new RecordConstructor(Question.class));
Question q = yaml.load(new FileReader("examples/question.yaml"));

About

Custom SnakeYAML Constructor and RecordUtils for deserializing Java records.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages