Provides support for parsing and emitting Yaml documents.
Data.Yaml provides a high-level interface based around the JSON datatypes provided by the aeson package. It uses Text.Libyaml from libyaml in its implementation of the low-level yaml encoder/decoder.
Examples
Usage examples can be found in the Data.Yaml documentation or in the examples directory.
Additional yaml modules
Data.Yaml.Include supports adding !include directives to your YAML files.
Data.Yaml.Builder and Data.Yaml.Parser allow more fine-grained control of parsing an rendering, as opposed to just using the aeson typeclass and datatype system for parsing and rendering.
Data.Yaml.Aeson is currently a re-export of Data.Yaml to explicitly choose to use the aeson-compatible API.
Changes
ChangeLog for yaml
0.11.5.0
New functions capable of parsing YAML streams containing multiple documents into a list of results:
Decode functions now return a NonStringKey error when attempting to decode a mapping with a complex key as it is not possible to decode these to an Aeson Value
Adds missing ToYaml instances
0.11.1.2
Compiles with GHC 8.8.1 (MonadFail split)
0.11.1.1
Use the appropriate Scientific rendering function to avoid a memory overflow when rendering. The previously used function from aeson would not use scientific notation, and could use large amounts of memory for values such as 1e9999999999999.
0.11.1.0
Better error messages in the Data.Yaml.Config module #168
Add LoadSettingsException exception and remove error printing from loadYamlSettings#172
0.11.0.0
Split out the libyaml and Text.Libyaml code into its own package. #145
0.10.4.0
Add decodeMarked and decodeFileMarked functions to Text.Libyaml, and
extend native bindings to extract mark information. #157
0.10.3.0
Add support for anchors and aliases to Data.Yaml.Builder #155