smash-aeson: Aeson support for the smash library

[ bsd3, data, library ] [ Propose Tags ] [ Report a vulnerability ]

Aeson support for the smash library


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.2.0.1, 0.3.0
Change log CHANGELOG.md
Dependencies aeson (>=2.0 && <2.4), base (>=4.15 && <4.23), smash (>=0.2.0 && <0.3) [details]
Tested with ghc ==9.6.7 || ==9.8.4 || ==9.10.3 || ==9.12.4 || ==9.14.1
License BSD-3-Clause
Copyright (c) 2020-2026 Emily Pillmore <emilypi@cohomolo.gy>
Author Emily Pillmore
Maintainer emilypi@cohomolo.gy
Uploaded by topos at 2026-10-27T01:07:52Z
Category Data
Home page https://github.com/emilypi/smash
Bug tracker https://github.com/emilypi/smash/issues
Distributions
Downloads 582 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-10-27 [all 1 reports]

Readme for smash-aeson-0.3.0

[back to package description]

smash-aeson: Aeson support for the smash library

CI Hackage

The instances use an explicit, stable object format across supported aeson versions. Import the corresponding Data.Can.Aeson, Data.Smash.Aeson, or Data.Wedge.Aeson module to bring the instances into scope.

Value JSON
Non, Nada, Nowhere {}
One a {"One": a}
Eno b {"Eno": b}
Two a b {"One": a, "Eno": b}
Smash a b {"SmashL": a, "SmashR": b}
Here a {"Here": a}
There b {"There": b}

Ordinary and lifted instances use the same representation. Object key order is irrelevant when decoding. Unexpected or missing keys are rejected, and nullable payloads retain their constructor keys even when their values are null.