module Polysemy.Time.Json where
import qualified Data.Aeson as Aeson
import Data.Aeson.TH (deriveJSON)
import qualified Language.Haskell.TH.Syntax as TH
json :: TH.Name -> TH.Q [TH.Dec]
json :: Name -> Q [Dec]
json =
Options -> Name -> Q [Dec]
deriveJSON Options
Aeson.defaultOptions {
fieldLabelModifier :: String -> String
Aeson.fieldLabelModifier = (Char -> Bool) -> String -> String
forall a. (a -> Bool) -> [a] -> [a]
dropWhile (Char
'_' Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
==),
unwrapUnaryRecords :: Bool
Aeson.unwrapUnaryRecords = Bool
True
}