Skip to content

Export JSONNull and custom env APIs; fix quoted paths - #21

Merged
NirBarak-RecoLabs merged 2 commits into
mainfrom
fix-quoted-paths-and-public-apis
Aug 23, 2026
Merged

Export JSONNull and custom env APIs; fix quoted paths#21
NirBarak-RecoLabs merged 2 commits into
mainfrom
fix-quoted-paths-and-public-apis

Conversation

@NirBarak-RecoLabs

@NirBarak-RecoLabs NirBarak-RecoLabs commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Promote quoted string steps on the left of [ when they sit in a path ("testData"[0]."value"), matching jsonata-js. String predicates like "Red"[$$="Bus"] stay literals.
  • Export JSONNull and Null so callers can type-assert JSON null values inside OrderedMap without importing internal/.
  • Add CustomEnvironment, EvalWithCustomEnvironmentAndVars, and StreamEvaluator.EvalManyWithVars. NewCustomEnv is unchanged.
  • Bump gnata-js to 0.3.0 so the post-merge v0.3.0 tag publishes the npm package alongside the Go module.

Fixes #19

Test plan

  • go test ./...
  • golangci-lint run
  • Quoted path cases from issue 19 (testData[0].value, "testData"[0]."value", mixed, $."testData"[0]."value")
  • {"a": null} Eval result type-asserts as gnata.JSONNull / gnata.IsNull
  • EvalManyWithVars binds $ vars; nil vars matches EvalMany
  • After merge, tag v0.3.0 on main (Go module + npm publish)

* Promote quoted string steps on the left of [ when they sit
  in a path ("testData"[0]."value"), matching jsonata-js.
  Standalone string predicates like "Red"[$$="Bus"] stay
  string literals.

* Export JSONNull and Null so OrderedMap values that are JSON
  null can be type-asserted without importing internal/.

* Add CustomEnvironment, EvalWithCustomEnvironmentAndVars, and
  StreamEvaluator.EvalManyWithVars. Keep NewCustomEnv.

Fixes #19

Signed-off-by: NirBarak-RecoLabs <nirb@recolabs.ai>
Version bump for the quoted-path, JSONNull, and custom-env
API release. Tag v0.3.0 after merge to publish both the Go
module and gnata-js.

Signed-off-by: NirBarak-RecoLabs <nirb@recolabs.ai>
@NirBarak-RecoLabs
NirBarak-RecoLabs merged commit 0dd232c into main Aug 23, 2026
2 checks passed
@NirBarak-RecoLabs
NirBarak-RecoLabs deleted the fix-quoted-paths-and-public-apis branch August 23, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect parsing of path query using quoted path segments and array index selectors

2 participants