aeson-modern-tojson: Provide a handy way for derving ToJSON proprely.

[ json, library, text, web ] [ Propose Tags ] [ Report a vulnerability ]

Provide a newtype to be used with DerivingVia to correctly derive ToJSON.

As simple as:

data W = W Int Int
deriving stock (Generic)
deriving (ToJSON) via (GenericallyToJSONToEncoding W)

[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0, 0.2.0.0
Change log ChangeLog.md
Dependencies aeson (>=1.0.0.0 && <3), base (>=4.7 && <5) [details]
License ISC
Copyright Gautier DI FOLCO
Author Gautier DI FOLCO
Maintainer gautier.difolco@gmail.com
Category Text, Web, JSON
Home page https://github.com/blackheaven/aeson-modern-tojson#readme
Bug tracker https://github.com/blackheaven/aeson-modern-tojson/issues
Source repo head: git clone https://github.com/blackheaven/aeson-modern-tojson
Uploaded by gdifolco at 2022-07-26T14:21:58Z
Distributions
Downloads 357 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-07-26 [all 1 reports]

Readme for aeson-modern-tojson-0.2.0.0

[back to package description]

aeson-modern-tojson

Provide a newtype to be used with DerivingVia to correctly derive ToJSON.

As simple as:

data W = W Int Int
    deriving stock (Generic)
    deriving (ToJSON) via (GenericallyToJSONToEncoding W)
data X = X Int Int
    deriving stock (Generic)
    deriving (ToJSON) via (GenericallyToEncoding X)