From 01454fe6d14d20701d8c9593371deae302327c52 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 25 Feb 2018 21:52:41 +0000 Subject: [PATCH] Fix WhoReply aeson parsing --- src/EuphApi/Connection.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/EuphApi/Connection.hs b/src/EuphApi/Connection.hs index 3caa92b..b8624d9 100644 --- a/src/EuphApi/Connection.hs +++ b/src/EuphApi/Connection.hs @@ -730,4 +730,6 @@ newtype WhoReply = WhoReply } deriving (Show) instance FromJSON WhoReply where - parseJSON v = WhoReply <$> parseJSON v + parseJSON = withObject "WhoReply" $ \o -> do + listing <- o .: "listing" + return (WhoReply listing)