HsYAML-aeson

JSON to YAML Adapter

Version on this page:0.2.0.1@rev:5
LTS Haskell 22.43:0.2.0.1@rev:10
Stackage Nightly 2024-12-05:0.2.0.1@rev:10
Latest on Hackage:0.2.0.1@rev:10

See all snapshots HsYAML-aeson appears in

GPL-2.0-or-later licensed by Herbert Valerio Riedel
Maintained by [email protected], Andreas Abel
This version can be pinned in stack with:HsYAML-aeson-0.2.0.1@sha256:24340936b00e50bf76963b4f344dbc596ac06edf30a7b249f7c73454ecdc681b,2618

Module documentation for 0.2.0.1

The YAML 1.2 format provides a much richer data-model and feature-set than the JavaScript Object Notation (JSON) format. 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.

Changes

See also http://pvp.haskell.org/faq

0.2.0.1

  • Allow aeson-2.0 and bytestring-0.11.
  • Build tested with GHC 7.4 – 9.0.

0.2.0.0

This release incorporates the work from Vijay Tadikamalla’s GSOC 2019 Project.

  • Breaking change: The result types of decode1, decode1', decodeValue, and decodeValue' have been changed from Either String _ to Either (Pos,String) _ to mirror the error-reporting change in the HsYAML-0.2 API
  • New functions encode1, encode1Strict, encodeValue, and encodeValue' for serializing JSON Values as YAML documents
  • New convenience function decode1Strict
  • New (orphan) instance ToYAML Data.Aeson.Value

0.1.0.0

  • First release. Released on an unsuspecting world.