[fix] zip files have "_id" instead of "id"

Allow to have either one.
parent a34bb341
...@@ -62,7 +62,7 @@ L.makeLenses ''Document ...@@ -62,7 +62,7 @@ L.makeLenses ''Document
instance FromJSON Document where instance FromJSON Document where
parseJSON (Object o) = do parseJSON (Object o) = do
_document_id <- o .: "id" _document_id <- o .: "id" <|> o .: "_id"
_document_title <- o .:? "title" _document_title <- o .:? "title"
_document_authors <- o .: "author" <|> pure [] _document_authors <- o .: "author" <|> pure []
_document_abstract <- o .:? "abstract" _document_abstract <- o .:? "abstract"
......
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