Skip to content

Commit f1d8120

Browse files
committed
Reword comments about SumEncoding
1 parent 299e658 commit f1d8120

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Data/Aeson/Types/Internal.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,18 +554,18 @@ data SumEncoding =
554554
-- the 'contentsFieldName' field.
555555
| UntaggedValue
556556
-- ^ Constructor names won't be encoded. Instead only the contents of the
557-
-- constructor will be encoded as if the type had single constructor. JSON
557+
-- constructor will be encoded as if the type had a single constructor. JSON
558558
-- encodings have to be disjoint for decoding to work properly.
559559
--
560560
-- When decoding, constructors are tried in the order of definition. If some
561561
-- encodings overlap, the first one defined will succeed.
562562
--
563-
-- /Note:/ Nullary constructors are encoded as the string (using
563+
-- /Note:/ Nullary constructors are encoded as strings (using
564564
-- 'constructorTagModifier'). Having a nullary constructor alongside a
565565
-- single field constructor that encodes to a string leads to ambiguity.
566566
--
567567
-- /Note:/ Only the last error is kept when decoding, so in the case of
568-
-- mailformed JSON, only an error for the last constructor will be reported.
568+
-- malformed JSON, only an error for the last constructor will be reported.
569569
| ObjectWithSingleField
570570
-- ^ A constructor will be encoded to an object with a single
571571
-- field named after the constructor tag (modified by the

0 commit comments

Comments
 (0)