Skip to content

Conversation

@loicalbertin
Copy link

This filter is backed to json.loads it will allow to provide similar/compatible templating than the from_json filter in ansible

Closes #1

This filter is backed to `json.loads` it will allow to provide
similar/compatible templating than the
[`from_json`](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#formatting-data-yaml-and-json)
filter in ansible
@fdiakh
Copy link
Collaborator

fdiakh commented Oct 28, 2021

Thanks. I think we can use this ad-hoc solution for the moment if we only have a few use cases for filters and think about something more generic if we find more of them.

Could you include a test and some documentation with your PR ? For the documentation, you could add a "Jinja templates" section just before the REST API section in the README were we would describe filters and other future customizations.

@loicalbertin
Copy link
Author

Great!
I will be out of the office next week. I will do this when back.

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.

Add a Jinja filter to parse json strings

2 participants