git.iko.soy/typeable/mandrill
on master help sign in
remove actual json instance
fd22b87Mark Wotton
src/Network/API/Mandrill/Types.hs−10
@@ -387,13 +387,3 @@ instance FromJSON MandrillDate where
387 case timeParse defaultTimeLocale "%Y-%m-%d %I:%M:%S%Q" (T.unpack t) of
387 case timeParse defaultTimeLocale "%Y-%m-%d %I:%M:%S%Q" (T.unpack t) of
388 Just d -> pure $ MandrillDate d
388 Just d -> pure $ MandrillDate d
389 _ -> fail "could not parse Mandrill date"
389 _ -> fail "could not parse Mandrill date"
390−
391−
392−instance ToJSON TEV.EmailAddress where
393− toJSON = String . TL.decodeUtf8 . TEV.toByteString
394−
395−instance FromJSON TEV.EmailAddress where
396− parseJSON (String s) = case TEV.emailAddress (TL.encodeUtf8 s) of
397− Nothing -> mzero
398− Just x -> return x
399− parseJSON _ = mzero