list package:aeson

Helper function to use with liftToEncoding. Useful when writing own ToJSON1 instances.
newtype F a = F [a]

-- This instance encodes Value as an array of chars
instance ToJSON1 F where
liftToJSON     tj _ (F xs) = liftToJSON     tj (listValue    tj) xs
liftToEncoding te _ (F xs) = liftToEncoding te (listEncoding te) xs

instance FromJSON1 F where
liftParseJSON p _ v = F <$> liftParseJSON p (listParser p) v
Helper function to use with liftParseJSON. See listEncoding.
Helper function to use with liftToJSON, see listEncoding.
This is similar in spirit to the readList method of Read. It makes it possible to give Value keys special treatment without using OverlappingInstances. End users should always be able to use the default implementation of this method.
This is similar in spirit to the readList method of Read. It makes it possible to give Value keys special treatment without using OverlappingInstances. End users should always be able to use the default implementation of this method.
This is similar in spirit to the showsList method of Show. It makes it possible to give Value keys special treatment without using OverlappingInstances. End users should always be able to use the default implementation of this method.
This is similar in spirit to the showsList method of Show. It makes it possible to give Value keys special treatment without using OverlappingInstances. End users should always be able to use the default implementation of this method.
Construct a map with the supplied mappings. If the list contains duplicate mappings, the later mappings take precedence.
>>> fromList [("a", 'x'), ("a", 'y')]
fromList [("a",'y')]
Construct a map from a list of elements. Uses the provided function, f, to merge duplicate entries with (f newVal oldVal).
Return a list of this map's elements in ascending order based of the textual key.
Return a list of this map's keys and elements. The order is not stable. Use toAscList for stable ordering.