yamlet
A YAML 1.2.2 library written in Haskell. Main features:
- Conformance: the parser passes all cases of the YAML test suite.
- Performance: decoding and encoding are very fast, see the benchmarks.
- Decoding and encoding with the classes
FromYamlandToYaml, with instances for common types. - Instances for your own data types, derived via
GenericYaml. Inspection tests check that the generic representation optimizes away for common shapes of data types. - Errors with the line, the column and the path of the problem, e.g.
jobs[1].name. The decoder reports the errors of independent parts together, e.g. every bad field of a record. - A syntax tree that keeps the comments and the empty lines. A program can change a file and write it back with its comments, and a decoded value can keep a part of the document as it was written.
- Output that YAML 1.1 parsers read the same way, e.g. PyYAML and go-yaml v2, which Kubernetes uses.
- Safe for untrusted input. The time of a decode is close to linear in the size of the input, and the memory is linear.
See also yamlet-aeson,
which decodes and encodes YAML with the FromJSON and ToJSON instances of
aeson, e.g. in a program that moves from the yaml package to yamlet.
Modules
yamlet-1.0.0.1
- Yamlet
- Yamlet.Decode
- Yamlet.Encode
- Yamlet.Error
- Yamlet.Generic
- Internal
- Yamlet.Internal.Chars
- Yamlet.Internal.Comments
- Yamlet.Internal.Compose
- Yamlet.Internal.Emit
- Yamlet.Internal.Encoder
- Yamlet.Internal.FromYaml
- Yamlet.Internal.Input
- Yamlet.Internal.Parser
- Yamlet.Internal.Render
- Yamlet.Internal.Schema
- Yamlet.Internal.Syntax
- Yamlet.Internal.ToYaml
- Yamlet.Internal.Utils
- Yamlet.Internal.View
- Yamlet.Schema
- Yamlet.Syntax
- Yamlet.Value