diff options
author | Yuchen Pei <hi@ypei.me> | 2022-09-14 11:10:33 +1000 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2022-09-14 11:10:33 +1000 |
commit | 1e8e3d5988d7d8f141e74ffd16ca45a1e576848a (patch) | |
tree | b3333fac8e8712ca848684dc9e6879683425ef6d /src/Servall/Types.hs | |
parent | c6bf32b3c49fe3a80d2e4dae3077bbe607ee940d (diff) |
summary tojson
Diffstat (limited to 'src/Servall/Types.hs')
-rw-r--r-- | src/Servall/Types.hs | 4 |
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] |