-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Json syntax allows to use null values in keys.
So basically this is syntax is valid in JSON:
{
"city": "London",
"house": null
}
However, this turns output to next if I use hash2kv:
# THIS FILE IS CONTROLLED BY PUPPET
city="London"
house="undef"
What I have in mind is that output should be like next:
# THIS FILE IS CONTROLLED BY PUPPET
city="London"
house
This is what I've tried:
if v.nil?
kv << "#{k}"
else
kv << "#{k}#{settings['key_val_separator']}#{settings['quote_char']}#{v}#{settings['quote_char']}"
end
but no avail since v is not nil. How to change ruby code so I can achieve my task ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels