git.iko.soy/typeable/bloodhound
on master help sign in
Adjusts the format of the OR filter
33a2af4Bjørn Nordbø
src/Database/Bloodhound/Types.hs+5−4
@@ -1285,13 +1285,14 @@ instance Seminearring Filter where
1285
1285
1286instance ToJSON Filter where
1286instance ToJSON Filter where
1287 toJSON (AndFilter filters cache) =
1287 toJSON (AndFilter filters cache) =
1288− object ["and" .=
1288+ object ["and" .=
1289 object [ "filters" .= fmap toJSON filters
1289 object [ "filters" .= fmap toJSON filters
1290− , "_cache" .= cache]]
1290+ , "_cache" .= cache]]
1291
1291
1292 toJSON (OrFilter filters cache) =
1292 toJSON (OrFilter filters cache) =
1293+ object ["or" .=
1293− object ["or" .= fmap toJSON filters
1294+ object [ "filters" .= fmap toJSON filters
1294− , "_cache" .= cache]
1295+ , "_cache" .= cache]]
1295
1296
1296 toJSON (NotFilter notFilter cache) =
1297 toJSON (NotFilter notFilter cache) =
1297 object ["not" .=
1298 object ["not" .=