
YAML is a new language for data. A readable, friendly language for storing lists, dictionaries, text, numerics and more. YAML 1.0 is out, in working draft. It's time to start using YAML.
Syck is an extension for reading and writing YAML swiftly in popular scripting languages. As Syck loads the YAML, it stores the data directly in your language's symbol table. This means speed. This means power. This means Do not disturb Syck because it is so focused on the task at hand that it will slay you mortally if you get in its way.
Syck 0.55: [updated 2005 May 18; Download from RubyForge]
Or keep up with development by watching CVS:
cvs -d:pserver:anonymous@rubyforge.org:/var/cvs/syck login cvs -z3 -d:pserver:anonymous@rubyforge.org:/var/cvs/syck co syck
Please note that to compile from CVS requires automake, autoconf, yacc and re2c [local].
Thanks to hefty support from Ruby users (and the kindness of Yukihiro Matsumoto), Syck is now a functioning part of Ruby 1.8.0. Snatch the code from Ruby CVS.
Visit YamlInRuby at the RubyGarden wiki. You'll feel so good afterwards.
How far along is Syck? Below indicates the completed tasks in green, yellow is partial and incomplete tasks in red.
|
Status of the Emitter |
||||
|
Output buffering Finished. Buffer size can be altered by the extension. |
Streaming In progress. Document separators still need to be added. |
Anchors and Aliases Supported. |
Collections Ruby code has been converted to C. |
Scalars Extension probes scalars for best output. |
|
Base64 Encoding Yep. |
Auto Shortcuts Yep! |
UTF-8, -16, -32 Output Unavailable. |
Force the Merge Key Unavailable. |
Force Comments Unavailable. |
|
Status of the Parser and Loader |
||||
|
YAML Separators Supported. Handles streams now. |
YAML Directives Supported. |
Transfer methods Doing well now. |
Private types Supported. |
URI Escaping Supported. |
|
URI Prefixing Supported. |
Throwaway comments Working well. |
Anchors Supported. |
Aliases Supported. |
Sequences Supported. Both nested and flow. |
|
Mappings Supported. Both nested and flow. |
CR-LF Normalization DOS linefeeds handled. |
Block Modifiers Supported. |
Explicit Indentation Done. |
Chomping Done and good. |
|
Literal Done. |
Folded Quite. |
Single Quoted Done. |
Double Quoted Doin just fine. |
Escaping ASCII escapes fine. Unicode still needed. |
|
Plain Works well! |
Implicit typing on/off Supported. |
Type: !omap Available in Ruby. |
Type: !pairs Available in Ruby. |
Type: !set Available in Ruby. |
|
Type: !binary Available in Ruby. |
Type: !bool Available in Ruby, Python, PHP. |
Type: !float Available in Ruby, Python, PHP. |
Type: !int Available in Ruby, Python, PHP. |
Type: !merge Available in Ruby. |
|
Type: !null Available in Ruby, Python, PHP. |
Type: !special This could be handled in Syck. |
Type: !timestamp Available in Ruby, Python, PHP. |
Type: !value Not supported. |
Taguri expansion on/off Supported. |
|
Status of Ruby 1.8-YAML Integration |
||||
|
YAML::load Finished. |
YAML::load_documents Finished. |
YAML::dump Finished. |
YAML::Stream class Still needs full Emitter streaming. Loading works fine. |
Type Handlers Finished. |