Syck Bindings for OCaml

About

The ocaml-syck library provides Syck bindings for OCaml, allowing an OCaml program to read and write YAML files. The code is available under the MIT license.

Example

Here's a simple example that illustrates how the YamlParser module works.

let parser = YamlParser.make () in
  try
    let root =
      YamlParser.parse_string
        parser
        "---\n- one\n- two\n- three\n"
    in
      match root with
      | YamlNode.SEQUENCE (_, nodes) ->
          List.iter
            (function
             | YamlNode.SCALAR (_, value) ->
                 print_endline value
             | _ -> ())
            nodes
      | _ -> ()
  with YamlParser.Error (msg) ->
    prerr_endline msg

Links

Documentation
ocamldoc-generated documentation that describes the OCaml bindings.
Download
Download the source tarball, and have at it.
SourceForge Project Homepage
From here, you can get to the CVS repository, discussion groups, and all the other gewgaws that SourceForge offers.

Contact

Chris Waterson