Array-typed smart parameters changed to broken JSON
I have a smart parameter of type array.
I set the value to a dashed list (of package names in my case) like this:
I can enter this without any problems, but when I want to update the value (e.g. add a new entry), this list will be presented like this:
"- puppet3\r\n- facter2\r\n- nginx-custom-dev"
Confirming the change (even if you haven't changed anything at all) will store the value as a string.
Entering the list as JSON results in a similar problem:
["puppet3", "facter2", "nginx-custom-dev"] will be turned into "[\"puppet3\", \"facter2\", \"nginx-custom-dev\"]"
So the list value will be turned into a string. Editing and saving a node with such a parameter will wrap the string again everytime it's saved, adding more quotes and escaping blackslashes.
Obviously preserving the original representation of the value or at least a compatible and valid representation.