-
Problem report
-
Resolution: Unresolved
-
Critical
-
6.0.19, 6.4.4, 7.0.3, 7.2.0alpha1
-
None
-
S24-W48/49, S24-W50/51/52
-
1
Example of tested JSON and its path:
{"f$o":"bar"} $.f$o
If you will test it, you will get an error:
cannot extract value from json by path "$.f$o": unsupported construct in jsonpath starting with: "$o"
https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/libs/zbxjson/jsonpath.c#205
I assume such object names were not considered when writing function "jsonpath_next":
https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/libs/zbxjson/jsonpath.c#522
How does it work for "jq" tool, just an example:
# echo '{"foo":"bar"}' | jq '.foo' "bar" # echo '{"f$o":"bar"}' | jq '."f$o"' "bar"
Some web based tools, like https://jsonpath.com/ do not require any special syntax/formatting/escaping for the example.