Step to reproduce
$ echo $'["\x7F"]' | ./JSON.sh
Expected behaviour
According to RFC 7159, character DEL 0x7F is perfectly valid unescaped.
JSON.sh should parse the string and print:
Actual behaviour
JSON.sh cannot parse the string and prints an error:
The issue comes from the fact that JSON.sh uses cntrl
to recognize control characters in regular expressions, and cntrl
includes DEL 0x7F, while JSON control characters (the one that MUST be escaped) only go from U+0000 to U+001F and don't include U+007F.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4