Pleased to announce the latest YAML.rb product.
For newcomers: YAML.rb is a Ruby module which can serialize objects into
plain text. The following is a YAML document containing a simple Hash:
soft drink: Coca-Cola
The following is a simple Array:
- The Minority Report
- The Little Black Box
- A Terran Odyssey
YAML.rb allows you to store Hash, Array, Struct, Regexp, Range, and a plethra
of other objects in YAML. To convert any object to YAML, use the Object#to_yaml
method. For example, to convert an Array to YAML:
[ 1, 2, 3 ].to_yaml
YAML.rb has many more features which I won’t go into here. I have a new YAML Cookbook
up which will simply describe how to represent various data structures in YAML. The
Cookbook is generated from our testing suite and is quite readable:
The 0.38 release adds Unicode support and a new Emitter class, which assists in making
the project threadsafe. Thanks to Tobias Peters and Ned Konz for their ideas and input.
I’ve also changed the name from YAML4r to YAML.rb. You can still find the site at
http://yaml4r.sf.net/ but I’ve changed the name in most every other place. The home
page for the whole umbrella YAML project is at http://www.yaml.org/.