-
Notifications
You must be signed in to change notification settings - Fork 176
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
Allow for subclassed types #158
Comments
cc @jamesls |
There's not a good way to do this now throuhg a public interface but I'm not opposed to adding something to make this easier. Having less restrictive type checking has come up a few times. |
@jamesls would you be able to add this public interface that allows the consumer of jmespath to teach jmespath about additional types that are convertible to string? Or do you need someone in the community to do it? |
@jamesls are you still there? |
So I'm not opposed to this feature, but offhand I don't have any thoughts on a better public API for this. If anyone has suggestions, I'm open to it. I suppose we'd add something to the Once we have an interface we like, I can take a crack at implementing this. |
A little background first, in Ansible there is a
json_query
filter plugin which usesjmespath
to query json. There is an issue open where users of that plugin get the following error:The comment that summarizes the issue is here ansible/ansible#27299 (comment).
The error is caused by the fact that Ansible uses its own types for strings. One of the hacks we've come up with was:
which seems weird since I am pretty sure
REVERSE_TYPES_MAP
is not supposed to be public.is there a proper way to do this? If not, is this something that would be considered to be added?
Thanks!
The text was updated successfully, but these errors were encountered: