on master help sign in
Reword comments about SumEncoding
commitf1d812028b6eac11dc8e49676bcc0b93cc04e9e4 authorlyxia <lysxia@gmail.com> dateSat 18 Mar 2017, 15:23 (10 years ago) parent299e658
1 file changed+3−3
Data/Aeson/Types/Internal.hs+3−3
Data/Aeson/Types/Internal.hs+3−3
@@ -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