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

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

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]

Properties

Versions 0.1.0.0, 0.1.0.0, 0.1.1.0, 0.2.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-28T20:58:10Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


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)