@@ -56,6 +56,7 @@ module Data.Aeson.Types.Internal
5656 fieldLabelModifier
5757 , constructorTagModifier
5858 , allNullaryToStringTag
59+ , allNullaryConstructorTagModifier
5960 , omitNothingFields
6061 , allowOmittedFields
6162 , sumEncoding
@@ -714,6 +715,7 @@ data Options = Options
714715 -- nullary constructors, will be encoded to just a string with
715716 -- the constructor tag. If 'False' the encoding will always
716717 -- follow the `sumEncoding`.
718+ , allNullaryConstructorTagModifier :: String -> String
717719 , omitNothingFields :: Bool
718720 -- ^ If 'True', record fields with a 'Nothing' value will be
719721 -- omitted from the resulting object. If 'False', the resulting
@@ -744,12 +746,13 @@ data Options = Options
744746 }
745747
746748instance Show Options where
747- show (Options f c a o q s u t r) =
749+ show (Options f c a ac o q s u t r) =
748750 " Options {"
749751 ++ intercalate " , "
750752 [ " fieldLabelModifier =~ " ++ show (f " exampleField" )
751753 , " constructorTagModifier =~ " ++ show (c " ExampleConstructor" )
752754 , " allNullaryToStringTag = " ++ show a
755+ , " allNullaryonstructorTagModifier =~ " ++ show (ac " ExampleConstructor" )
753756 , " omitNothingFields = " ++ show o
754757 , " allowOmittedFields = " ++ show q
755758 , " sumEncoding = " ++ show s
@@ -843,15 +846,16 @@ data JSONKeyOptions = JSONKeyOptions
843846-- @
844847defaultOptions :: Options
845848defaultOptions = Options
846- { fieldLabelModifier = id
847- , constructorTagModifier = id
848- , allNullaryToStringTag = True
849- , omitNothingFields = False
850- , allowOmittedFields = True
851- , sumEncoding = defaultTaggedObject
852- , unwrapUnaryRecords = False
853- , tagSingleConstructors = False
854- , rejectUnknownFields = False
849+ { fieldLabelModifier = id
850+ , constructorTagModifier = id
851+ , allNullaryToStringTag = True
852+ , allNullaryConstructorTagModifier = id
853+ , omitNothingFields = False
854+ , allowOmittedFields = True
855+ , sumEncoding = defaultTaggedObject
856+ , unwrapUnaryRecords = False
857+ , tagSingleConstructors = False
858+ , rejectUnknownFields = False
855859 }
856860
857861-- | Default 'TaggedObject' 'SumEncoding' options:
0 commit comments