Implemented the possibility to add custom path functions#1015
Open
luizvnasc wants to merge 2 commits intojson-path:masterfrom
Open
Implemented the possibility to add custom path functions#1015luizvnasc wants to merge 2 commits intojson-path:masterfrom
luizvnasc wants to merge 2 commits intojson-path:masterfrom
Conversation
|
Wow that would be great to add, Someone is going to check it? |
MNL5
approved these changes
Aug 31, 2024
uarlouski
reviewed
Jan 27, 2025
| if (!PathFunction.class.isAssignableFrom(function)){ | ||
| throw new InvalidClassException("Function with name: " + name + "must be a instance of PathFunction class"); | ||
| } | ||
| FUNCTIONS.put(name,function); |
Contributor
There was a problem hiding this comment.
I think we should not be able to override existing built-in functions
Author
There was a problem hiding this comment.
Totally agree, I will change the method to avoid override built-in functions
|
请问这个合并了吗 |
|
waiting this PR |
| if (!PathFunction.class.isAssignableFrom(function)){ | ||
| throw new InvalidClassException("Function with name: " + name + "must be a instance of PathFunction class"); | ||
| } | ||
| FUNCTIONS.put(name,function); |
There was a problem hiding this comment.
Currently functions are created in this map. Once a function is registered, it will be available everywhere. I think it is necessary to be able to separate contexts by place of use.
Author
There was a problem hiding this comment.
it will make a major change because we will need to put the std functions in a context too.
|
Hi, When can this request be merge? |
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.
No description provided.