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

Allow dot '.' in json key names #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

johnrey1
Copy link

Added a positive lookbehind to add a slash '' before a dot '.' in json key names.

I needed this for openvpn config file

{ "Default": { "admin_ui.https.ip_address": "all", "admin_ui.https.port": "943" } }

in your ansible yaml file

'Default.admin_ui\.https\.port'="944"

The single quotes are needed around the parameter or else ansible escapes the backslash when passing as a parameter to ghetto-json

bryanlarsen added a commit to bryanlarsen/ansible-ghetto-json that referenced this pull request Nov 1, 2017
If the value contains an equal sign (`=`), we get a crash

`ValueError: dictionary update sequence element FauxFaux#3 has length 3; 2 is required`
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.

1 participant