summaryrefslogtreecommitdiff
path: root/src/Servall/Types.hs
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-09-14 11:10:33 +1000
committerYuchen Pei <hi@ypei.me>2022-09-14 11:10:33 +1000
commit1e8e3d5988d7d8f141e74ffd16ca45a1e576848a (patch)
treeb3333fac8e8712ca848684dc9e6879683425ef6d /src/Servall/Types.hs
parentc6bf32b3c49fe3a80d2e4dae3077bbe607ee940d (diff)
summary tojson
Diffstat (limited to 'src/Servall/Types.hs')
-rw-r--r--src/Servall/Types.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Servall/Types.hs b/src/Servall/Types.hs
index 794482c..ae4f73a 100644
--- a/src/Servall/Types.hs
+++ b/src/Servall/Types.hs
@@ -60,4 +60,6 @@ instance FromJSON WikiSummary where
parseJSON (Object o) =
WikiSummary <$> o .: "title" <*> o .: "wikibase_item" <*> o .: "pageid"
-instance ToJSON WikiSummary
+instance ToJSON WikiSummary where
+ toJSON (WikiSummary title wikibase pageid) =
+ object ["title" .= title, "wikibase" .= wikibase, "pageid" .= pageid]