Hydrogen YAML

Java API for YAML Processing

License

License

GroupId

GroupId

com.apicatalog
ArtifactId

ArtifactId

hydrogen-yaml
Last Version

Last Version

0.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

Hydrogen YAML
Java API for YAML Processing
Project URL

Project URL

https://github.com/filip26/hydrogen-yaml
Source Code Management

Source Code Management

https://github.com/filip26/hydrogen-yaml/tree/master

Download hydrogen-yaml

How to add to project

<!-- https://jarcasting.com/artifacts/com.apicatalog/hydrogen-yaml/ -->
<dependency>
    <groupId>com.apicatalog</groupId>
    <artifactId>hydrogen-yaml</artifactId>
    <version>0.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.apicatalog/hydrogen-yaml/
implementation 'com.apicatalog:hydrogen-yaml:0.2.1'
// https://jarcasting.com/artifacts/com.apicatalog/hydrogen-yaml/
implementation ("com.apicatalog:hydrogen-yaml:0.2.1")
'com.apicatalog:hydrogen-yaml:jar:0.2.1'
<dependency org="com.apicatalog" name="hydrogen-yaml" rev="0.2.1">
  <artifact name="hydrogen-yaml" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.apicatalog', module='hydrogen-yaml', version='0.2.1')
)
libraryDependencies += "com.apicatalog" % "hydrogen-yaml" % "0.2.1"
[com.apicatalog/hydrogen-yaml "0.2.1"]

Dependencies

test (2)

Group / Artifact Type Version
org.glassfish : jakarta.json jar 2.0.0
org.junit.jupiter : junit-jupiter jar 5.7.0

Project Modules

There are no modules declared in this project.

Java API for YAML Processing

Java CI with Maven Language grade: Java Maintainability Rating Coverage Maven Central License

Hydrogen YAML is the simplest human-readable data-serialization language inspired by StrictYAML. Some YAML features are not intentionally supported.

Hydrogen Features

  • Fully decoupled data model from a representation
  • Implicit serialization style
    • an intelligent YAML generator
    • customizable print style
  • Explicit typing
    • target class adapters

Unsupported YAML Features

  • Implicit typing
  • Duplicate keys
  • Explicit tags
  • Node anchors and refs
  • Flow style (except scalars and simple sequences)
  • Complex mapping keys
  • Directives

See What YAML features does StrictYAML remove? for more details.

Presence of a removed feature raises an exception during parsing.

Usage

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'

Examples

YamlNode node = Yaml.createMappingBuilder()
                    .add("key", "value")
                    .add("sequence", Yaml.createSequenceBuilder()
                                         .add("item")
                    ).build();
     
Yaml.createWriter(OutputStream|Writer).write(YamlNode);

Roadmap

  • 0.1 Document API
  • 0.2 Writer API
  • 0.3 Parser API
  • 0.5 Flow Sequence of Scalars
  • 0.6 Multi-documents
  • 0.8 Beans Binding

Versions

Version
0.2.1