-
Problem report
-
Resolution: Incomplete
-
Major
-
None
-
3.4.11
-
None
One of the users which is using my https://github.com/kloczek/zapish reported that on Debian which is using as /bin/sh dash scripts dumping templates are failing wit error like:
parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line
I don't see such issues on ksh or bash so I've started looking for comments about this error message.
I found https://github.com/stedolan/jq/issues/1049
in which is:
@rupenp RFC7159 a) does not allow any control characters other than some whitespace (tabs and newlines) in JSON texts, and b) requires that they be escaped when in strings. If you have JSON texts that violate one of these requirements, you can try to get around them with sed(1). Something like sed -e s/\t/\\t/g -e ..., perhaps, for violations of (b), for example.
Looks like a bug in zabbix API because in generated output those characters are not escaped.