package miniyaml
Module YamlSource
A minimal YAML reader and writer.
The supported subset is the one people hand-write in configuration files: block mappings and sequences, inline flow collections ([1, 2] and {a: b}), plain and quoted scalars, and comments. Block scalars (| and >), anchors, aliases, tags and multi-document streams are rejected with an explicit error, and flow collections have to fit on a single line.
A YAML value.
Parse a YAML document. On failure, the message is prefixed with the line at which the error was detected.
Parse the YAML document contained in a file. Raises Sys_error if the file cannot be read.
Print a YAML document, using block style and two-space indentation. The result always ends with a newline and can be read back with of_string: of_string (to_string v) = Ok v for every v.