Skip to content

Commit

Permalink
Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
santanusinha committed Feb 3, 2022
1 parent 82f1d32 commit c38fd7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Hope
# Hope [![Java CI with Maven](https://github.com/santanusinha/hope/actions/workflows/ci.yml/badge.svg)](https://github.com/santanusinha/hope/actions/workflows/ci.yml)
Hope is a high level language for predicate evaluation on JSON written in java. It uses jackson for json handling and json-path for value extraction.

#### Sample Hope expressions/rules
```
"$.val" + 2 > 3
"$.a" + "$.b" <= math.abs("$.c")
'/val' + 2 > 3
'/a' + '/b' <= math.abs('/c')
```

#### Features
Expand Down Expand Up @@ -37,7 +37,7 @@ The main class you need to know is `HopeLangEngine`. To use this class use the p
The following code snippet evaluates an expression against a parsed jackson Json node.
```
final JsonNode root = new ObjectMapper().readTree("{\"val\" : 10 }");
final String expr = " \"$.val\" + 2 > 9";
final String expr = " '/val' + 2 > 9";
if(engine.evaluate(expr, root)) {
...
}
Expand Down

0 comments on commit c38fd7e

Please sign in to comment.