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

Add extension point to register custom function implementation #81

Closed
NikiforovAll opened this issue Jan 5, 2023 · 4 comments
Closed

Comments

@NikiforovAll
Copy link

Hi,

I would like you to consider adding a feature to register a custom JmesPathFunction, so it is possible to use JMESPath in more advanced scenarios.

It could be something simple as constructor overload that exposes Action<IRegisterFunctions> as a parameter.

Roughly speaking:

public JmesPath(Action<IRegisterFunctions> factory) {
  repository_ = JmesPathFunctionFactory.Create(evaluator_);
  factory.Invoke(repository_);
}

Please let me know if you accept contributions, I would be more than happy to add this feature.

@springcomp
Copy link
Collaborator

springcomp commented Jan 5, 2023

Thanks for your feedback.
Great news ! This feature is already implemented😀.

I agree this needs more / better documentation.
In the meantime, please look at the compliance tool to understand what is expected.

Also, you can look at my obsolete repository of custom extensions as a starting point for yours.

@NikiforovAll
Copy link
Author

NikiforovAll commented Jan 5, 2023

Thank you for the help and prompt reply.

@NikiforovAll
Copy link
Author

@springcomp
Copy link
Collaborator

@NikiforovAll Thanks for the pointer.

We had actually touched on this feature in the official page.
https://jdevillard.github.io/JmesPath.Net/

For some reason, this page is not linked from the repository instructions.

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

No branches or pull requests

2 participants