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
>>> fromList [("a", 'x'), ("a", 'y')] fromList [("a",'y')]