RbYAML - A pure Ruby YAML 1.1 loader and dumper

Project Contact: Ola Bini <[email protected]>

The code is based mostly on the Python code written by Kirill Simonov <[email protected]> for PyYAML3000.

RbYAML is a project originating in the JRuby project (jruby.sourceforge.net), to create a pure Ruby YAML parser for use in JRuby and SYCK cannot be used in this case. Since the effort of writing a new one from scratch seemed like a major undertaking it seemed easier to port an existing one.

The current functionality is more or less 1.1-compliant. What’s missing is the Unicode-support. The idea is to have the interface resemble SYCK as much as possible, but this is still work in progress, since some of the major architectural choices are quite different.

Use

Just require ‘rbyaml’ and use it as you would use YAML, but in module RbYAML instead:

require 'rbyaml'
RbYAML.load("--- \n- A\n- b\n- c\n")       ---->   ["A","b","c"]
"foo".to_yaml                              ---->   "foo\n"

More information

Visit rbyaml.ologix.com for more information and updated versions

License

RbYAML is distributed with a MIT license, which can be found in the file LICENSE.