Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: Support for fn eval() #146

Closed
wants to merge 9 commits into from
Closed

wip: Support for fn eval() #146

wants to merge 9 commits into from

Conversation

deepakraog
Copy link
Contributor

@deepakraog deepakraog commented Nov 20, 2024

Add support for JSONata string functions #92

@deepakraog deepakraog self-assigned this Nov 20, 2024
@deepakraog deepakraog requested a review from a team as a code owner November 20, 2024 19:31
Copy link
Contributor

@tommy tommy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a different approach to implementing $eval. The current direction appears overfitted to the test cases, rather than a general solution. Any jsonata expression can be used inside the string argument to $eval (including eval itself), so I think we need to somehow invoke the complete parser/evaluator.

I don't know off the top of my head what level is the right level to hook into. It could be creating an entirely new crate::JsonAta instance. We'll need to find the right way to pass in the bindings, too, since by default the string is evaluated in the current expression's context.

src/evaluator/functions.rs Show resolved Hide resolved
@deepakraog deepakraog closed this Dec 4, 2024
@deepakraog deepakraog deleted the fn_eval branch December 4, 2024 08:31
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.

2 participants