Array package:aeson
A JSON "array" (sequence).
A constructor will be encoded to a 2-element array where the first
element is the tag of the constructor (modified by the
constructorTagModifier) and the second element the encoded
contents of the constructor.
withArray expected f value applies
f to the
Array when
value is an
Array and fails
otherwise.
Error message example
withArray "MyType" f (String "oops")
-- Error: "parsing MyType failed, expected Array, but encountered String"
Type tag for tuples contents, see
tuple.