FOVYMRDC25V5AMZSFJHVNG6G7MMQPWPALLNI5RWF3JRDXRPMOCIAC
instance ToJSON IndexItem where
toJSON value =
let (primer, xs) = value ^. _IndexItem
in object ["primer" .= primer, "locations" .= xs]
toEncoding value =
let (primer, xs) = value ^. _IndexItem
in pairs ("primer" .= primer <> "locations" .= xs)
instance FromJSON IndexItem where
parseJSON = withObject "IndexItem" $ \value ->
let item = (,) <$> value .: "primer" <*> value .: "locations"
in IndexItem <$> item