@@ -76,8 +76,8 @@ instance ( WriteProduct a, WriteProduct b
7676instance ( AllNullary (a :+: b) allNullary
7777 , SumToJSON (a :+: b) allNullary ) => GToJSON (a :+: b) where
7878 -- If all constructors of a sum datatype are nullary and the
79− -- 'nullaryToString' option is set they are encoded to strings.
80− -- This distinction is made by 'sumToJSON':
79+ -- 'allNullaryToStringTag' option is set they are encoded to
80+ -- strings. This distinction is made by 'sumToJSON':
8181 gToJSON opts = (unTagged :: Tagged allNullary Value -> Value)
8282 . sumToJSON opts
8383 {-# INLINE gToJSON #-}
@@ -92,8 +92,8 @@ instance ( GetConName f
9292 , ObjectWithSingleField f
9393 , TwoElemArray f ) => SumToJSON f True where
9494 sumToJSON opts
95− | nullaryToString opts = Tagged . String . pack
96− . constructorTagModifier opts . getConName
95+ | allNullaryToStringTag opts = Tagged . String . pack
96+ . constructorTagModifier opts . getConName
9797 | otherwise = Tagged . nonAllNullarySumToJSON opts
9898 {-# INLINE sumToJSON #-}
9999
@@ -327,8 +327,8 @@ instance ( FromProduct a, FromProduct b
327327instance ( AllNullary (a :+: b) allNullary
328328 , ParseSum (a :+: b) allNullary ) => GFromJSON (a :+: b) where
329329 -- If all constructors of a sum datatype are nullary and the
330− -- 'nullaryToString' option is set they are expected to be encoded as
331− -- strings. This distinction is made by 'parseSum':
330+ -- 'allNullaryToStringTag' option is set they are expected to be
331+ -- encoded as strings. This distinction is made by 'parseSum':
332332 gParseJSON opts = (unTagged :: Tagged allNullary (Parser ((a :+: b) d)) ->
333333 (Parser ((a :+: b) d)))
334334 . parseSum opts
@@ -343,8 +343,8 @@ instance ( SumFromString (a :+: b)
343343 , FromPair (a :+: b)
344344 , FromTaggedObject (a :+: b) ) => ParseSum (a :+: b) True where
345345 parseSum opts
346− | nullaryToString opts = Tagged . parseAllNullarySum opts
347− | otherwise = Tagged . parseNonAllNullarySum opts
346+ | allNullaryToStringTag opts = Tagged . parseAllNullarySum opts
347+ | otherwise = Tagged . parseNonAllNullarySum opts
348348 {-# INLINE parseSum #-}
349349
350350instance ( FromPair (a :+: b)