[fix] ngrams_url can be optional as it turns out

parent c673924b
......@@ -261,7 +261,7 @@ data Work = Work
, locations :: [Location]
, locations_count :: Count
, mesh :: [MeSH]
, ngrams_url :: URL
, ngrams_url :: Maybe URL
, open_access :: OpenAccess
, primary_location :: Maybe Location
, publication_date :: CreatedDate
......@@ -303,7 +303,7 @@ instance FromJSON Work where
locations <- v .: "locations"
locations_count <- v .: "locations_count"
mesh <- v .: "mesh"
ngrams_url <- v .: "ngrams_url"
ngrams_url <- v .:? "ngrams_url"
open_access <- v .: "open_access"
primary_location <- v .:? "primary_location"
publication_date <- v .: "publication_date"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment