File tree Expand file tree Collapse file tree
src/test/java/com/api/jsonata4java/expressions Expand file tree Collapse file tree Original file line number Diff line number Diff 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.0 </version>
17+ <version>2.5.1 </version>
1818</dependency>
1919```
2020
@@ -53,8 +53,8 @@ Note: to build and deploy the jars to Maven Central you need to use a command li
5353` mvn clean install deploy -Prelease `
5454
5555Once you have run the launcher, you can find the jar files in the /target directory. There are two&colon ;
56- * ** JSONata4Java-2.5.0 -jar-with-dependencies.jar** (thinks includes dependent jar files)
57- * ** JSONata4Java-2.5.0 .jar** (only the JSONata4Java code)
56+ * ** JSONata4Java-2.5.1 -jar-with-dependencies.jar** (thinks includes dependent jar files)
57+ * ** JSONata4Java-2.5.1 .jar** (only the JSONata4Java code)
5858
5959The com.api.jsonata4java.Tester program enables you to enter an expression and run it
6060against the same JSON as is used at the https://try.jsonata.org site. You can also
@@ -66,6 +66,8 @@ against the same JSON as is used at the https://try.jsonata.org site.
6666
6767
6868### Fixes ###
69+ Issue 313 fixed a problem with duplicates in the spread function
70+
6971Issue 167 to add Synced suffixed evaluation methods to allow people running
7072in a multi-threaded environment to use evaluateSynced, etc. The non-Synced
7173methods are not thread-safe.
Original file line number Diff line number Diff line change 2525 <modelVersion >4.0.0</modelVersion >
2626 <groupId >com.ibm.jsonata4java</groupId >
2727 <artifactId >JSONata4Java</artifactId >
28- <version >2.5.0 </version >
28+ <version >2.5.1 </version >
2929 <name >JSONata4Java</name >
3030 <description >Port of jsonata.js to Java to enable rules for JSON content</description >
3131 <url >https://github.com/IBM/JSONata4Java</url >
Original file line number Diff line number Diff line change @@ -1562,6 +1562,100 @@ public void testArraySeqConstructor() throws Exception {
15621562 }
15631563 }
15641564
1565+ @ Test
1566+ public void testSpreadFunction () throws Exception {
1567+ test ("$spread($$.array1 ~> $map(function($v1) {\n " +
1568+ " $$.array2 ~> $map(function($v2) {\n " +
1569+ " $v1 & '#' & $v2\n " +
1570+ " })\n " +
1571+ " }))" , "[\n " +
1572+ " \" abcd#pp\" ,\n " +
1573+ " \" abcd#uu\" ,\n " +
1574+ " \" abcd#tt\" ,\n " +
1575+ " \" abcd#uu\" ,\n " +
1576+ " \" abcd#ww\" ,\n " +
1577+ " \" abcd#gg\" ,\n " +
1578+ " \" abcd#qq\" ,\n " +
1579+ " \" abcd#nn\" ,\n " +
1580+ " \" abcd#ff\" ,\n " +
1581+ " \" cdef#pp\" ,\n " +
1582+ " \" cdef#uu\" ,\n " +
1583+ " \" cdef#tt\" ,\n " +
1584+ " \" cdef#uu\" ,\n " +
1585+ " \" cdef#ww\" ,\n " +
1586+ " \" cdef#gg\" ,\n " +
1587+ " \" cdef#qq\" ,\n " +
1588+ " \" cdef#nn\" ,\n " +
1589+ " \" cdef#ff\" ,\n " +
1590+ " \" efgh#pp\" ,\n " +
1591+ " \" efgh#uu\" ,\n " +
1592+ " \" efgh#tt\" ,\n " +
1593+ " \" efgh#uu\" ,\n " +
1594+ " \" efgh#ww\" ,\n " +
1595+ " \" efgh#gg\" ,\n " +
1596+ " \" efgh#qq\" ,\n " +
1597+ " \" efgh#nn\" ,\n " +
1598+ " \" efgh#ff\" ,\n " +
1599+ " \" ghij#pp\" ,\n " +
1600+ " \" ghij#uu\" ,\n " +
1601+ " \" ghij#tt\" ,\n " +
1602+ " \" ghij#uu\" ,\n " +
1603+ " \" ghij#ww\" ,\n " +
1604+ " \" ghij#gg\" ,\n " +
1605+ " \" ghij#qq\" ,\n " +
1606+ " \" ghij#nn\" ,\n " +
1607+ " \" ghij#ff\" ,\n " +
1608+ " \" ijkl#pp\" ,\n " +
1609+ " \" ijkl#uu\" ,\n " +
1610+ " \" ijkl#tt\" ,\n " +
1611+ " \" ijkl#uu\" ,\n " +
1612+ " \" ijkl#ww\" ,\n " +
1613+ " \" ijkl#gg\" ,\n " +
1614+ " \" ijkl#qq\" ,\n " +
1615+ " \" ijkl#nn\" ,\n " +
1616+ " \" ijkl#ff\" ,\n " +
1617+ " \" klmn#pp\" ,\n " +
1618+ " \" klmn#uu\" ,\n " +
1619+ " \" klmn#tt\" ,\n " +
1620+ " \" klmn#uu\" ,\n " +
1621+ " \" klmn#ww\" ,\n " +
1622+ " \" klmn#gg\" ,\n " +
1623+ " \" klmn#qq\" ,\n " +
1624+ " \" klmn#nn\" ,\n " +
1625+ " \" klmn#ff\" ,\n " +
1626+ " \" mnop#pp\" ,\n " +
1627+ " \" mnop#uu\" ,\n " +
1628+ " \" mnop#tt\" ,\n " +
1629+ " \" mnop#uu\" ,\n " +
1630+ " \" mnop#ww\" ,\n " +
1631+ " \" mnop#gg\" ,\n " +
1632+ " \" mnop#qq\" ,\n " +
1633+ " \" mnop#nn\" ,\n " +
1634+ " \" mnop#ff\" \n " +
1635+ "]" , null , "{\n " +
1636+ " \" array1\" : [\n " +
1637+ " \" abcd\" ,\n " +
1638+ " \" cdef\" ,\n " +
1639+ " \" efgh\" ,\n " +
1640+ " \" ghij\" ,\n " +
1641+ " \" ijkl\" ,\n " +
1642+ " \" klmn\" ,\n " +
1643+ " \" mnop\" \n " +
1644+ " ],\n " +
1645+ " \" array2\" : [\n " +
1646+ " \" pp\" ,\n " +
1647+ " \" uu\" ,\n " +
1648+ " \" tt\" ,\n " +
1649+ " \" uu\" ,\n " +
1650+ " \" ww\" ,\n " +
1651+ " \" gg\" ,\n " +
1652+ " \" qq\" ,\n " +
1653+ " \" nn\" ,\n " +
1654+ " \" ff\" \n " +
1655+ " ]\n " +
1656+ "}" );
1657+ }
1658+
15651659 @ Test
15661660 public void testAppendFunction () throws Exception {
15671661
Original file line number Diff line number Diff line change 11#! /bin/bash
2- java -cp target/JSONata4Java-2.5.0 -jar-with-dependencies.jar com.api.jsonata4java.Tester $1
2+ java -cp target/JSONata4Java-2.5.1 -jar-with-dependencies.jar com.api.jsonata4java.Tester $1
Original file line number Diff line number Diff line change 1- java -cp target/JSONata4Java-2.5.0 -jar-with-dependencies.jar com.api.jsonata4java.testerui.TesterUI
1+ java -cp target/JSONata4Java-2.5.1 -jar-with-dependencies.jar com.api.jsonata4java.testerui.TesterUI
Original file line number Diff line number Diff line change 11#! /bin/bash
2- java -cp target/JSONata4Java-2.5.0 -jar-with-dependencies.jar com.api.jsonata4java.testerui.TesterUI
2+ java -cp target/JSONata4Java-2.5.1 -jar-with-dependencies.jar com.api.jsonata4java.testerui.TesterUI
You can’t perform that action at this time.
0 commit comments