Skip to content

Commit 32861b3

Browse files
committed
1 parent bedc818 commit 32861b3

File tree

7 files changed

+27
-7
lines changed

7 files changed

+27
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The easiest way to use this library is to include it as a dependency in your Mav
1414
<dependency>
1515
<groupId>com.ibm.jsonata4java</groupId>
1616
<artifactId>JSONata4Java</artifactId>
17-
<version>2.5.6</version>
17+
<version>2.6.0</version>
1818
</dependency>
1919
```
2020

@@ -51,8 +51,8 @@ Note: to build and deploy the jars to Maven Central you need to use a command li
5151
`mvn clean install deploy -Prelease`
5252

5353
Once you have run the launcher, you can find the jar files in the /target directory. There are two&colon;
54-
* **JSONata4Java-2.5.6-jar-with-dependencies.jar** (thinks includes dependent jar files)
55-
* **JSONata4Java-2.5.6.jar** (only the JSONata4Java code)
54+
* **JSONata4Java-2.6.0-jar-with-dependencies.jar** (thinks includes dependent jar files)
55+
* **JSONata4Java-2.6.0.jar** (only the JSONata4Java code)
5656

5757
The com.api.jsonata4java.Tester program enables you to enter an expression and run it
5858
against the same JSON as is used at the https://try.jsonata.org site. You can also

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<modelVersion>4.0.0</modelVersion>
1515
<groupId>com.ibm.jsonata4java</groupId>
1616
<artifactId>JSONata4Java</artifactId>
17-
<version>2.5.6</version>
17+
<version>2.6.0</version>
1818
<name>JSONata4Java</name>
1919
<description>Port of jsonata.js to Java to enable rules for JSON content</description>
2020
<url>https://github.com/IBM/JSONata4Java</url>

src/main/java/com/api/jsonata4java/expressions/utils/FunctionUtils.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,13 @@ public static boolean useContextVariable(FunctionBase fct, Function_callContext
907907

908908
// does the signature permit use of the context as a argument
909909
if (signature.indexOf("-") >= 0 && prc != null && prc instanceof PathContext) {
910+
int child_count = prc.children != null ? prc.children.size() : 0;
911+
if (child_count > 0) {
912+
Object first_child = prc.getChild(0);
913+
if (first_child instanceof Function_callContext) {
914+
return false;
915+
}
916+
}
910917
return true;
911918
}
912919

tester.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#! /bin/bash
2-
java -cp target/JSONata4Java-2.5.6-jar-with-dependencies.jar com.api.jsonata4java.Tester $1
2+
java -cp target/JSONata4Java-2.6.0-jar-with-dependencies.jar com.api.jsonata4java.Tester $1

testerui.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
java -cp target/JSONata4Java-2.5.6-jar-with-dependencies.jar com.api.jsonata4java.testerui.TesterUI
1+
java -cp target/JSONata4Java-2.6.0-jar-with-dependencies.jar com.api.jsonata4java.testerui.TesterUI

testerui.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#! /bin/bash
2-
java -cp target/JSONata4Java-2.5.6-jar-with-dependencies.jar com.api.jsonata4java.testerui.TesterUI
2+
java -cp target/JSONata4Java-2.6.0-jar-with-dependencies.jar com.api.jsonata4java.testerui.TesterUI

testfiles/dataobject_q.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"company": {
3+
"name": "TechCorp",
4+
"departments": {
5+
"IT": {
6+
"employees": 50
7+
},
8+
"HR": {
9+
"employees": 10
10+
}
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)