An intelligent YAML generator
APACHE-2.0 License
Hydrogen YAML is the simplest human-readable data-serialization language inspired by StrictYAML. Some YAML features are not intentionally supported.
See What YAML features does StrictYAML remove? for more details.
Presence of a removed feature raises an exception during parsing.
Maven
<dependency>
<groupId>com.apicatalog</groupId>
<artifactId>hydrogen-yaml</artifactId>
<version>0.2.1</version>
</dependency>
Gradle
compile group: 'com.apicatalog', name: 'hydrogen-yaml', version: '0.2.1'
YamlNode node = Yaml.createMappingBuilder()
.add("key", "value")
.add("sequence", Yaml.createSequenceBuilder()
.add("item")
).build();
Yaml.createWriter(OutputStream|Writer).write(YamlNode);