jmespath / jmespath.py

JMESPath is a query language for JSON.
http://jmespath.org
MIT License
2.19k stars 181 forks source link

Running `compile` with custom functions #202

Closed MichaelAquilina closed 4 years ago

MichaelAquilina commented 4 years ago

Is it possible to run compile on a JMESPath expression which includes references to custom functions?

To provide a specific use case: we are using compile as a way of validating input on a form. However ever since we introduced custom functions, we've been unable to use compile anymore since (as far as we can tell) we cannot pass the relevant options.

This has resulted in two workarounds:

However this means that expressions with custom functions such as join often do not work for us since: a) they do not allow null values as input b) the fields inputs used are not known at validation time, which result in them being null

MichaelAquilina commented 4 years ago

Just realised that this issue was just a simple human error on our part so going to close it!