on master help sign in
update error message from 'associated' to 'containing'
a46d783grdvnl
Data/Aeson/Types/FromJSON.hs+1−1
@@ -959,7 +959,7 @@ contextType = prependContext
959contextTag :: Text -> [String] -> Parser a -> Parser a
959contextTag :: Text -> [String] -> Parser a -> Parser a
960contextTag tagKey cnames = prependFailure
960contextTag tagKey cnames = prependFailure
961 ("expected Object with key \"" ++ unpack tagKey ++ "\"" ++
961 ("expected Object with key \"" ++ unpack tagKey ++ "\"" ++
962− " associated to one of " ++ show cnames ++ ", ")
962+ " containing to one of " ++ show cnames ++ ", ")
963
963
964-- | Add the name of the constructor being parsed to a parser's error messages.
964-- | Add the name of the constructor being parsed to a parser's error messages.
965contextCons :: ConName -> TypeName -> Parser a -> Parser a
965contextCons :: ConName -> TypeName -> Parser a -> Parser a
tests/golden/generic.expected+1−1
@@ -10,7 +10,7 @@ Error in $: parsing Types.SomeType(Unary) failed, key "contents" not found
10Error in $: parsing Types.SomeType(Record) failed, key "testone" not found
10Error in $: parsing Types.SomeType(Record) failed, key "testone" not found
11Error in $.testone: parsing Double failed, unexpected Boolean
11Error in $.testone: parsing Double failed, unexpected Boolean
12Error in $.tag: parsing Types.SomeType failed, expected tag field to be one of ["nullary","unary","product","record","list"], but found tag "X"
12Error in $.tag: parsing Types.SomeType failed, expected tag field to be one of ["nullary","unary","product","record","list"], but found tag "X"
13−Error in $: parsing Types.SomeType failed, expected Object with key "tag" associated to one of ["nullary","unary","product","record","list"], key "tag" not found
13+Error in $: parsing Types.SomeType failed, expected Object with key "tag" containing to one of ["nullary","unary","product","record","list"], key "tag" not found
14Error in $: parsing Types.SomeType failed, expected Object, but encountered Array
14Error in $: parsing Types.SomeType failed, expected Object, but encountered Array
15SomeType (single-field)
15SomeType (single-field)
16Error in $.unary: parsing Int failed, expected Number, but encountered Object
16Error in $.unary: parsing Int failed, expected Number, but encountered Object