| Copyright | (c) Marien Matser Gerard van Schie Jelle Teeuwissen 2022 |
|---|---|
| License | MIT |
| Maintainer | jelleteeuwissen@hotmail.nl |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
JsonLogic.Pure.Evaluator
Description
Documentation
apply :: [Operation] -> Rule -> Data -> Result Json Source #
Apply takes a list of operations, a rule and data. And together with the default operations evaluates it.
>>>apply [] (read "{\"cat\":[\"Hello, \", \"World!\"]}":: Json) JsonNullRight "Hello, World!"
applyEmpty :: [Operation] -> Rule -> Data -> Result Json Source #
applyEmpty takes a list of operations, a rule and data. And without the default operations evaluates it.
>>>applyEmpty [] (read "{\"cat\":[\"Hello, \", \"World!\"]}":: Json) JsonNullLeft (UnrecognizedOperation {operationName = "cat"})