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

[ json, library, text, web ] [ Propose Tags ]

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 (ModernToJSON W)

[Skip to Readme]
Versions [RSS] [faq] 0.1.0.0
Change log ChangeLog.md
Dependencies aeson (>=1.0.0.0 && <2), 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 2021-06-28T21:23:56Z
Distributions NixOS:0.1.0.0
Downloads 50 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-06-28 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates


Readme for aeson-modern-tojson-0.1.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 (ModernToJSON W)