Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 11e8fc3

Browse files
committed
Add ToJSON Language
1 parent cc30411 commit 11e8fc3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/GitHub/Data/Repos.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ instance FromJSON Contributor where
250250
instance FromJSON Language where
251251
parseJSON = withText "Language" (pure . Language)
252252

253+
instance ToJSON Language where
254+
toJSON = toJSON . getLanguage
255+
253256
instance FromJSON a => FromJSON (HM.HashMap Language a) where
254257
parseJSON = fmap mapKeyLanguage . parseJSON
255258
where

0 commit comments

Comments
 (0)