State of YAML Parsing

Feb 21, 2010 at 9:14 AM

I'm looking to use a YAML parser for a Silverlight application, and the YAML parser here certainly looks more capable than the other C# YAML parser (, at the very least due to age (this project has been updated more recently) and YAML spec support (this one has tests verifying 1.2 compatibility).

What is the status of the parser, with respect to usefully using it in an application? What are the current caveats and things to watch out for?

Would you mind providing a simple overview of using the parser? (I've been trying to figure out from the tests in the source code, but everything seems just a little bit underdocumented...)

Here's what I'm presuming so far:

  1. Add references to Yaml.Abstract.dll and Yaml.Core.dll (Will I need to rebuild these myself for Silverlight?)
  2. Use one of the static methods in YamlLanguage to parse a YAML file (RepresentFile, maybe?) -- YamlLanguageContext looks like just a stub?
  3. Use the object graph of Tagged* classes from Tagged.cs?

I realize that you are trying to focus on deeper serialization/deserialization in the long run, which is admirable, but for now I'm mostly just interested in the easiest way you can give me access to the contents of a YAML document as any sort of object graph that I can iterate/LINQ my way through. (I don't think that my current document structure for this would lend itself well to automatic deserialization anyway; its an untagged structure designed more for "human" readable/writable style than for processing, if that makes sense...)

Thanks in advance, --Max Battcher / WorldMaker