Created
July 22, 2018 11:59
-
-
Save dmalikov/956b67d0e8ff8b5e7e5f6d38d9ea8933 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
instance FromJSON Database where | |
- parseJSON (Object o) = Database | |
- <$> o .: "id" | |
- <*> o .: "_rid" | |
- <*> o .: "_ts" | |
- <*> o .: "_self" | |
- <*> o .: "_etag" | |
- <*> o .: "_colls" | |
- <*> o .: "_users" | |
+ parseJSON (Object o) = | |
+ Database <$> o .: "id" <*> o .: "_rid" <*> o .: "_ts" <*> o .: "_self" <*> o .: "_etag" <*> o .: "_colls" <*> | |
+ o .: "_users" | |
parseJSON _ = mempty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment