@hackage aeson-yaml1.1.0.1

Output any Aeson value as YAML (pure Haskell library)

<h1 id="aeson-yaml">aeson-yaml</h1> <p>BSD3-licensed, pure Haskell library to encode any Aeson value as YAML.</p> <h2 id="usage">Usage</h2> <pre><code class="language-haskell">import qualified Data.Aeson.Yaml as Aeson.Yaml Aeson.Yaml.encode :: ToJSON a =&gt; a -&gt; LazyByteString -- To encode multiple values, separated by '---' (YAML documents), -- use `encodeDocuments`. Aeson.Yaml.encodeDocuments :: ToJSON a =&gt; [a] -&gt; LazyByteString -- To encode values of different types, use `toJSON` from `Data.Aeson` -- like so: encodeDocuments [toJSON x, toJSON y, toJSON z] </code></pre> <p>See <a href="bin/JsonToYaml.hs">bin/JsonToYaml.hs</a> for a simple command-line application using this library.</p> <h2 id="documentation">Documentation</h2> <p><a href="https://hackage.haskell.org/package/aeson-yaml">Hackage</a></p> <h2 id="license">License</h2> <p><a href="LICENSE">BSD3</a></p> <h2 id="motivation">Motivation</h2> <p>This library does not depend on any external YAML library with C bindings, like <code>yaml</code>, or a restrictive license, like <code>HsYaml</code> (GPLv3). Note, though, that this library can only be used for encoding, not decoding.</p> <p>This library also works with GHCJS and Eta.</p>