JYaml - Yaml library for
the Java language

Notice: I am no longer maintaining JYaml. See this this Q&A for a list of alternatives.

What is JYaml?

JYaml is a Java library for working with the Yaml file format.

What is Yaml?

Yaml is a data serialization language that is well suited for structured data and yet simpler and more human-readable than XML. It is perfect for configuration files, initialization files, and other application specific files.

Direct mapping to programming objects with JYaml

With JYaml, entities in a Yaml file are directly mapped into programming objects. This means interaction with the library will be very simple, in most cases requiring only one method call. For example, the following Yaml file

date: 11/29/2005
    -   store: ken stanton music
        category: entertainment
        description: saxophone repair
        total: 382.00
    -   store: walmart
        category: groceries
        total: 14.26

transforms into the following data structure

with just the following line of code

Entry entry = Yaml.loadType(new File("ReceiptEntry.yml"),