JSON to YAML Adapter
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
The YAML 1.2 format provides
a much richer data-model and feature-set
However, sometimes it's desirable to ignore the extra capabilities
and treat YAML as if it was merely a more convenient markup format
for humans to write JSON data. To this end this module provides a
compatibility layer atop HsYAML
which allows decoding YAML documents in the more limited JSON data-model while also providing
convenience by reusing aeson's
FromJSON instances for decoding the YAML data into native Haskell data types.
See also http://pvp.haskell.org/faq
This release incorporates the work from Vijay Tadikamalla’s GSOC 2019 Project.
- Breaking change: The result types of
decodeValue'have been changed from
Either String _to
Either (Pos,String) _to mirror the error-reporting change in the
- New functions
encodeValue'for serializing JSON Values as YAML documents
- New convenience function
- New (orphan)
instance ToYAML Data.Aeson.Value
- First release. Released on an unsuspecting world.