Export JSONNull and custom env APIs; fix quoted paths - #21
Merged
Conversation
* 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>
5 tasks
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>
RecoLabs-YaronBratspiess
approved these changes
Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[when they sit in a path ("testData"[0]."value"), matching jsonata-js. String predicates like"Red"[$$="Bus"]stay literals.JSONNullandNullso callers can type-assert JSON null values insideOrderedMapwithout importinginternal/.CustomEnvironment,EvalWithCustomEnvironmentAndVars, andStreamEvaluator.EvalManyWithVars.NewCustomEnvis unchanged.gnata-jsto0.3.0so the post-mergev0.3.0tag publishes the npm package alongside the Go module.Fixes #19
Test plan
go test ./...golangci-lint runtestData[0].value,"testData"[0]."value", mixed,$."testData"[0]."value"){"a": null}Eval result type-asserts asgnata.JSONNull/gnata.IsNullEvalManyWithVarsbinds$vars; nil vars matchesEvalManyv0.3.0on main (Go module + npm publish)