Skip to content

Commit

Permalink
Merge branch 'sq'
Browse files Browse the repository at this point in the history
  • Loading branch information
santanusinha committed Feb 3, 2022
2 parents c18f9b7 + c38fd7e commit 245dd36
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
10 changes: 5 additions & 5 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 All @@ -20,7 +20,7 @@ Use the following dependency in your code.
<dependency>
<groupId>io.appform.hope</groupId>
<artifactId>hope-lang</artifactId>
<version>1.0.13</version>
<version>1.1.0</version>
</dependency>
```

Expand All @@ -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
6 changes: 6 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 1.1.0

- Supported field reference using json pointers
- Supported quotation using single quotes
- Jackson verion bump

2 changes: 1 addition & 1 deletion hope-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hope</artifactId>
<groupId>io.appform.hope</groupId>
<version>1.0.13</version>
<version>1.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion hope-lang/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hope</artifactId>
<groupId>io.appform.hope</groupId>
<version>1.0.13</version>
<version>1.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>io.appform.hope</groupId>
<artifactId>hope</artifactId>
<packaging>pom</packaging>
<version>1.0.13</version>
<version>1.1.0</version>

<name>Hope</name>
<url>https://github.com/santanusinha/hope</url>
Expand Down

0 comments on commit 245dd36

Please sign in to comment.