https://github.com/turbomack/aeson-combinators
Aeson combinators for dead simple JSON decoding
https://github.com/turbomack/aeson-combinators
haskell json parsing web
Last synced: 2 months ago
JSON representation
Aeson combinators for dead simple JSON decoding
- Host: GitHub
- URL: https://github.com/turbomack/aeson-combinators
- Owner: turboMaCk
- License: bsd-3-clause
- Created: 2020-02-11T22:43:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-29T08:52:07.000Z (over 1 year ago)
- Last Synced: 2025-04-12T23:20:57.796Z (2 months ago)
- Topics: haskell, json, parsing, web
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/aeson-combinators
- Size: 118 KB
- Stars: 13
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Aeson Combinators
[](https://actions-badge.atrox.dev/turboMaCk/aeson-combinators/goto?ref=master)
[](https://builtwithnix.org)[**Low overhead**](#performance) 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