yaml

Support for parsing and rendering YAML documents.

http://github.com/snoyberg/yaml/

Version on this page:0.8.17.1@rev:1
LTS Haskell 22.14:0.11.11.2@rev:2
Stackage Nightly 2024-03-28:0.11.11.2@rev:2
Latest on Hackage:0.11.11.2@rev:2

See all snapshots yaml appears in

BSD-3-Clause licensed by Michael Snoyman, Anton Ageev, Kirill Simonov
Maintained by Michael Snoyman
This version can be pinned in stack with:yaml-0.8.17.1@sha256:fc2bff92beeda9c20ae75897832ede2dca08b022dd27dabceedc3a46ae708c3f,4786

yaml

Provides support for parsing and emitting Yaml documents.

This package includes the full libyaml C library version 0.1.5 by Kirill Simonov in the package so you don’t need to worry about any non-Haskell dependencies.

The package is broken down into two primary modules. Data.Yaml provides a high-level interface based around the JSON datatypes provided by the aeson package. Text.Libyaml provides a lower-level, streaming interface. For most users, Data.Yaml is recommended.

Examples

Usage examples can be found in the Data.Yaml documentation or in the examples directory.

Additional 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

0.8.17.1

  • Avoid bug in Cabal #83

0.8.17

  • loadYamlSettingsArgs

0.8.16.1

  • Slight doc improvement

0.8.16

Add env variable parsing. loadYamlSettings can read config values from the environment with Yaml that specifies an env var. The syntax is

var: _env:ENV_VAR:default

0.8.15.3

  • Give a warning when compiling with GHCJS

0.8.15.2

  • Canonicalise Monad instances #76

0.8.15.1

  • Compile with aeson below 0.7 #70

0.8.15

  • Parse Scientific directly, avoiding loss in precision. #68

0.8.14

  • Pretty print improvements for exceptions #67

0.8.13

  • Pretty module #66

0.8.12

  • Proper handling of String "+123" #64

0.8.11

  • Function to print prettier parse exceptions #59

0.8.10

Add the Data.Yaml.Include module