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.
Changes
Revision history for smash-aeson
0.3.0 – 2026-10-26
Start the 0.3 major release series and require smash >=0.2.0 && <0.3.
Preserve the explicit ordinary and lifted JSON wire formats across aeson 2.0–2.3.
0.2.0.2 – 2026-10-26
Update dependency bounds and the supported GHC matrix to 9.6–9.14.
Update copyrights through 2026.
Support aeson >=2.0 && <2.4 while retaining the explicit JSON wire formats.
Decode two-field objects independently of key order.
Add fixed wire-format fixtures, malformed-input tests, and ordinary/lifted instance properties.