Provide a handy way for derving ToJSON proprely.

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

ISC licensed by Gautier DI FOLCO

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)