Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Aeson.APIFieldJsonTH
Contents
Description
Utils for using aeson's deriveJSON with lens's makeFields
Synopsis
- deriveApiFieldJSON :: Name -> Q [Dec]
How to use this library
data SomeQuery = SomeQuery { _someQueryPage :: Int , _someQueryText :: String } deriving (Eq, Show) makeFields ''SomeQuery deriveApiFieldJSON ''SomeQuery
This is compatible with the next json
{"page": 3, "text": "foo"}