aeson-combinators

Aeson combinators for dead simple JSON decoding

https://github.com/turboMaCk/aeson-combinators

Version on this page:0.1.0.1
LTS Haskell 22.39:0.1.2.1
Stackage Nightly 2024-10-31:0.1.2.1
Latest on Hackage:0.1.2.1

See all snapshots aeson-combinators appears in

BSD-3-Clause licensed and maintained by Marek Fajkus
This version can be pinned in stack with:aeson-combinators-0.1.0.1@sha256:519092b6441a7361a77e8cd5b3aef8142051cd87febe9c83bf4a588605b81329,3151

Module documentation for 0.1.0.1

Aeson Combinators

Build Status Build Status built with nix

Low overhead value space Decoder on top of Aeson’s Parser for combinator style decoding.

This library is compatible with GHC as well as recent versions of GHCJS.

Performance

Decoder a type is a function Value -> Parser a the same as parseJSON member function of FromJSON class. This means there should be near zero overhead. Aeson types and functions are reused where possible. Similarly Encoder a type follow toJSON from ToJSON type class.

Simple benchmark shows that implementation using aeson-combinators performs better than equivalent derived instance and on par (actually even slightly better though with difference in noise range) with manually implemented instance.

License

(c) 2020 Marek Fajkus BSD-3-Clause

Changes

Revision history for aeson-combinators

0.1.0.1 – 2022-05-03

  • fix benchmark compatibility with ghc 9.2.2

0.1.0.0 – 2022-03-21

  • Aeson 2 compatibility

0.0.5.0 – 2021-03-13

  • make test suite compatible with hashable 1.3.1.0

0.0.4.1 – 2021-02-14

  • Cleanup README
  • CI maintanance & GHC compatibility update

0.0.4.0 – 2020-10-24

  • Encode module for encoding

0.0.3.0 – 2020-10-11

  • Combinators for dealing with failure
  • oneOf function
  • parseMaybe and parseEither
  • Documentation improvements

0.0.2.1 – 2020-03-08

  • Add README to extra source files

0.0.2.0 – 2020-03-08

  • GHCJS compatibility

0.0.1.1 – 2020-03-01

  • Fixes and improvements in documentation
  • Add source-repository to cabal file

0.0.1.0 – 2020-02-29

  • First version. Released on an unsuspecting world.