-
-
Save dminuoso/fa1d35ce709c98749b6bc82b75a9d05a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ApplicativeDo #-} | |
{-# LANGUAGE RecordWildCards #-} | |
instance FromJSON MyFlag where | |
parseJSON (Object v) = do | |
code <- v .: "code" | |
name <- v .: "name" | |
full_name <- v .: "full_name" | |
relative_height <- v .: "relative_height" | |
relative_width <- v .: "relative_width" | |
pure MyFlag{..} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment