Title: Custom function pipe error · Issue #83 · dashjoin/jsonata-java · GitHub
Open Graph Title: Custom function pipe error · Issue #83 · dashjoin/jsonata-java
X Title: Custom function pipe error · Issue #83 · dashjoin/jsonata-java
Description: test in jsonata describe("custom function pipe", () => { // Platform specific describe("$add(1,2) ~> $add(?, 3)", function() { it("should return 6", async function() { function add(a, b) { return a + b; } var expr = jsonata("$add(1,2) ~>...
Open Graph Description: test in jsonata describe("custom function pipe", () => { // Platform specific describe("$add(1,2) ~> $add(?, 3)", function() { it("should return 6", async function() { function add(a, b) { return a...
X Description: test in jsonata describe("custom function pipe", () => { // Platform specific describe("$add(1,2) ~> $add(?, 3)", function() { it("should return 6", async functi...
Opengraph URL: https://github.com/dashjoin/jsonata-java/issues/83
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Custom function pipe error","articleBody":"test in jsonata\n\n```\ndescribe(\"custom function pipe\", () =\u003e {\n // Platform specific\n describe(\"$add(1,2) ~\u003e $add(?, 3)\", function() {\n it(\"should return 6\", async function() {\n function add(a, b) {\n return a + b;\n }\n\n var expr = jsonata(\"$add(1,2) ~\u003e $add(?, 3)\");\n expr.registerFunction(\"add\", add);\n var result = await expr.evaluate();\n var expected = 6;\n expect(result).to.be.equal(expected);\n });\n });\n});\n```\nsuccess resturn 6\n\ntest in jsonata java\n\n```\n @Test\n public void testCustomFunctionPipe() {\n var expression = Jsonata.jsonata(\"$add(1, 2) ~\u003e $add(?, 3)\");\n expression.registerFunction(\"add\", new JFunction(new JFunctionCallable() {\n @SuppressWarnings(\"rawtypes\")\n @Override\n public Object call(Object input, List args) throws Throwable {\n return (Integer) args.get(0) + (Integer) args.get(1);\n }\n }, null));\n Assertions.assertEquals(6, expression.evaluate(null));\n }\n```\nthrown Exception\n```\nProc not found null\n\ncom.dashjoin.jsonata.JException: Attempted to invoke a non-function\n\tat com.dashjoin.jsonata@0.9.9-local4/com.dashjoin.jsonata.Jsonata.applyInner(Jsonata.java:1782)\n\tat com.dashjoin.jsonata@0.9.9-local4/com.dashjoin.jsonata.Jsonata.apply(Jsonata.java:1705)\n\tat com.dashjoin.jsonata@0.9.9-local4/com.dashjoin.jsonata.Jsonata.evaluateApplyExpression(Jsonata.java:1547)\n\tat com.dashjoin.jsonata@0.9.9-local4/com.dashjoin.jsonata.Jsonata._evaluate(Jsonata.java:203)\n\tat com.dashjoin.jsonata@0.9.9-local4/com.dashjoin.jsonata.Jsonata.evaluate(Jsonata.java:131)\n\tat com.dashjoin.jsonata@0.9.9-local4/com.dashjoin.jsonata.Jsonata.evaluate(Jsonata.java:2607)\n\tat com.dashjoin.jsonata@0.9.9-local4/com.dashjoin.jsonata.Jsonata.evaluate(Jsonata.java:2568)\n\tat com.dashjoin.jsonata@0.9.9-local4/com.dashjoin.jsonata.CustomFunctionTest.testCustomFunctionPipe(CustomFunctionTest.java:65)\n```\n\nI need to use this call chain for another custom method. I used a simple \"add\" as an example.\nIn my case I can't use Fn2 because I need \"input\" data, but all Fn* interfaces pass only arguments.","author":{"url":"https://github.com/sergeevik","@type":"Person","name":"sergeevik"},"datePublished":"2026-01-25T01:06:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/83/jsonata-java/issues/83"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d35e400c-843b-fb2a-0efd-14edacdbbc51 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8DD2:9C16A:10E38DB:18A079A:6A4E388E |
| html-safe-nonce | a392c2efb181880fb6d03457dacab5c52d02619f3b4ec9de128ba633ac5a38f9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4REQyOjlDMTZBOjEwRTM4REI6MThBMDc5QTo2QTRFMzg4RSIsInZpc2l0b3JfaWQiOiI3MTY3NjUyODc1MTc4MjI3ODU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 07908352c55129e37a9300c346fc1748d64f6d1f5434ba89bbfb7b1d53b485f8 |
| hovercard-subject-tag | issue:3852360028 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/dashjoin/jsonata-java/83/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cceae67077695312307081d083edf65f374009a430a586c8fd8ede7813bd1f29/dashjoin/jsonata-java/issues/83 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cceae67077695312307081d083edf65f374009a430a586c8fd8ede7813bd1f29/dashjoin/jsonata-java/issues/83 |
| og:image:alt | test in jsonata describe("custom function pipe", () => { // Platform specific describe("$add(1,2) ~> $add(?, 3)", function() { it("should return 6", async function() { function add(a, b) { return a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sergeevik |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/dashjoin/jsonata-java git https://github.com/dashjoin/jsonata-java.git |
| octolytics-dimension-user_id | 61882284 |
| octolytics-dimension-user_login | dashjoin |
| octolytics-dimension-repository_id | 668664370 |
| octolytics-dimension-repository_nwo | dashjoin/jsonata-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 668664370 |
| octolytics-dimension-repository_network_root_nwo | dashjoin/jsonata-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 42a6d378d7587a44c93aca255096cd66b7c8eb2d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width