Skip to content

Commit

Permalink
Accept unescaped U+007F DELETE per RFC 7159
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Oct 27, 2016
1 parent 022ec33 commit eadcad4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions JSON.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ tokenize () {
if echo "test string" | egrep -o "test" >/dev/null 2>&1
then
ESCAPE='(\\[^u[:cntrl:]]|\\u[0-9a-fA-F]{4})'
CHAR='[^[:cntrl:]"\\]'
CHAR='([^[:cntrl:]"\\]|)'
else
GREP=awk_egrep
ESCAPE='(\\\\[^u[:cntrl:]]|\\u[0-9a-fA-F]{4})'
CHAR='[^[:cntrl:]"\\\\]'
CHAR='([^[:cntrl:]"\\\\]|\x7F)'
fi

local STRING="\"$CHAR*($ESCAPE$CHAR*)*\""
Expand Down
1 change: 1 addition & 0 deletions test/valid/string_with_unescaped_chars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"₀򂂀𝌆"
1 change: 1 addition & 0 deletions test/valid/string_with_unescaped_chars.parsed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[] "₀򂂀𝌆"

0 comments on commit eadcad4

Please sign in to comment.