What is YAML? Project Page


Binary only (.jar) [16k] Binary + src (.jar) [30k]

Current Status

27 June 2005 - Welcome to yaml4j! The project was approved last week, and everything's ready to go.

Unlike so many projects, yaml4j is built for the faint-of-heart. Its interface is simple and intuitive, and has just two main methods -- one for loading, and one for dumping. How much simpler can it get?

The alpha release is ready for download now. It supports loading and dumping of scalars, lists, and hashes only. If you want yaml4j to support more of the YAML spec, feel free to work on the core!

How to Use Yaml4J -- in One Lesson

import yaml4j.Loader;
import yaml4j.Dumper;
import java.io.*;

public class Test
   public static void main(String[] args) throws Exception
      File f = new File(args[0]);
      Reader reader = new BufferedReader(new FileReader(f));
      Loader loader = new Loader();
      loader.load( reader );
      Object doc = loader.getDocument();
      Writer out = new StringWriter();
      Dumper d = new Dumper( out );
      d.dump( doc );
      System.err.print( out.toString() );

Coming Someday!

* Reference handling (no forecast!)