You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i was dabbling with my bar config yesterday and noticed some error arising from parsing the JSON output of sketchybar --query with jq:
jq: parse error: Invalid escape at line 124, column 98
This error message came from a value i provided to a click_script property:
click_script="open -a 'System Preferences'"
Changing this to the following made the error disappear:
click_script="open -a \"System Preferences\""
The problem with the first one is, that the apostrophe is being escaped during serialization since the following commit: 14c6381
I can't tell, why that has been introduced but the apostrophe is a character that must not be escaped according to RFC 7159 Section 7.
Sadly, jq does not parse the rest of the JSON due to the error being thrown.
Again, i'm not sure what led to the decision of escaping apostrophes but, in my opinion, this should either be fixed by (preferably) reverting the above commit or by adding something to the documentation hinting towards this behavior.
The text was updated successfully, but these errors were encountered:
Hi there,
i was dabbling with my bar config yesterday and noticed some error arising from parsing the JSON output of
sketchybar --query
withjq
:jq: parse error: Invalid escape at line 124, column 98
This error message came from a value i provided to a
click_script
property:click_script="open -a 'System Preferences'"
Changing this to the following made the error disappear:
click_script="open -a \"System Preferences\""
The problem with the first one is, that the apostrophe is being escaped during serialization since the following commit: 14c6381
I can't tell, why that has been introduced but the apostrophe is a character that must not be escaped according to RFC 7159 Section 7.
Sadly,
jq
does not parse the rest of the JSON due to the error being thrown.Again, i'm not sure what led to the decision of escaping apostrophes but, in my opinion, this should either be fixed by (preferably) reverting the above commit or by adding something to the documentation hinting towards this behavior.
The text was updated successfully, but these errors were encountered: