on 0.11.1.4 help sign in
typeable/aeson/tests/Options.hs
31 lines 921 B history raw
1module Options where
3import Data.Aeson.Types
4import Data.Char
6optsDefault :: Options
7optsDefault = defaultOptions
8 { fieldLabelModifier = map toLower
9 , constructorTagModifier = map toLower
10 }
12opts2ElemArray :: Options
13opts2ElemArray = optsDefault
14 { allNullaryToStringTag = False
15 , sumEncoding = TwoElemArray
16 }
18optsUnwrapUnaryRecords :: Options
19optsUnwrapUnaryRecords = optsDefault
20 { unwrapUnaryRecords = True
21 }
23optsTaggedObject :: Options
24optsTaggedObject = optsDefault
25 { allNullaryToStringTag = False }
27optsObjectWithSingleField :: Options
28optsObjectWithSingleField = optsDefault
29 { allNullaryToStringTag = False
30 , sumEncoding = ObjectWithSingleField
31 }