Title: incorrect eval with deep (ThreadLocal context) · Issue #90 · dashjoin/jsonata-java · GitHub
Open Graph Title: incorrect eval with deep (ThreadLocal context) · Issue #90 · dashjoin/jsonata-java
X Title: incorrect eval with deep (ThreadLocal context) · Issue #90 · dashjoin/jsonata-java
Description: example input { "funcs": { "func": "$.a + $.b" }, "a": 3, "b": 4 } query $eval($.funcs.func) expected result: 7 in jsonata online https://try.jsonata.org/fU8Heq6ee work correct simple code in test jsonata-java @Test public void testEvalD...
Open Graph Description: example input { "funcs": { "func": "$.a + $.b" }, "a": 3, "b": 4 } query $eval($.funcs.func) expected result: 7 in jsonata online https://try.jsonata.org/fU8Heq6ee work correct simple code in test ...
X Description: example input { "funcs": { "func": "$.a + $.b" }, "a": 3, "b": 4 } query $eval($.funcs.func) expected result: 7 in jsonata online https://try.jsona...
Opengraph URL: https://github.com/dashjoin/jsonata-java/issues/90
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"incorrect eval with deep (ThreadLocal context)","articleBody":"example input\n\n```\n{\n \"funcs\": {\n \"func\": \"$.a + $.b\"\n },\n \"a\": 3,\n \"b\": 4\n}\n```\n\nquery `$eval($.funcs.func)`\n\nexpected result: 7\nin jsonata online https://try.jsonata.org/fU8Heq6ee work correct\n\n\u003cimg width=\"576\" height=\"207\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/6d030372-b159-4f7e-8732-744f5be96293\" /\u003e\n\nsimple code in test jsonata-java\n```\n @Test\n public void testEvalDeep() {\n Object input = Json.parseJson(\"{\" +\n \" \\\"funcs\\\": {\" +\n \" \\\"func\\\": \\\"$.a + $.b\\\"\" +\n \" },\" +\n \" \\\"a\\\": 3,\" +\n \" \\\"b\\\": 4\" +\n \"}\");\n var expression = Jsonata.jsonata(\"$eval($.funcs.func)\");\n Object evaluate = expression.evaluate(input);\n Assertions.assertEquals(7, evaluate);\n }\n```\n\nresult:\n```\norg.opentest4j.AssertionFailedError: \nExpected :7\nActual :null\n```\n\nWhile debugging, I discovered that the input data is stored in a threadLocal.\nWhen evaluatePath executes along a path, each new step stores a new `input` in the threadLocal. When the evaluatePath completes, the previous operation returns, and the input data remains from the evaluatePath operation.","author":{"url":"https://github.com/sergeevik","@type":"Person","name":"sergeevik"},"datePublished":"2026-01-29T09:13:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/90/jsonata-java/issues/90"}
| 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:f48fcf69-9a47-c37c-99eb-56251847bbdc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C43A:1A12B5:918FD0:CE0667:6A4E7FE3 |
| html-safe-nonce | 9e2113f6eeb3ad02aa283706813e3352c5d2f2f12531b077e0fb8fa4f0ba9ccd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDNBOjFBMTJCNTo5MThGRDA6Q0UwNjY3OjZBNEU3RkUzIiwidmlzaXRvcl9pZCI6IjEwMjM1OTI2NjY2NDg5NjkxODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0e0926be4155d0a444c3ddf9cb220fa076f1345548e7abf96f2d7720f640d366 |
| hovercard-subject-tag | issue:3869623430 |
| 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/90/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3cd9ffcb7274c7c618fd6091275b47cc5c8c5407eb0ebc078361f5c4c6ea6d3b/dashjoin/jsonata-java/issues/90 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3cd9ffcb7274c7c618fd6091275b47cc5c8c5407eb0ebc078361f5c4c6ea6d3b/dashjoin/jsonata-java/issues/90 |
| og:image:alt | example input { "funcs": { "func": "$.a + $.b" }, "a": 3, "b": 4 } query $eval($.funcs.func) expected result: 7 in jsonata online https://try.jsonata.org/fU8Heq6ee work correct simple code in test ... |
| 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 | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| 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 | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width