mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
(cherry picked from commit 2608bc369e)
This commit is contained in:
@@ -600,6 +600,7 @@ proc escapeJsonUnquoted*(s: string; result: var string) =
|
||||
of '\b': result.add("\\b")
|
||||
of '\f': result.add("\\f")
|
||||
of '\t': result.add("\\t")
|
||||
of '\v': result.add("\\v")
|
||||
of '\r': result.add("\\r")
|
||||
of '"': result.add("\\\"")
|
||||
of '\0'..'\7': result.add("\\u000" & $ord(c))
|
||||
|
||||
@@ -218,6 +218,9 @@ proc parseString(my: var JsonParser): TokKind =
|
||||
of 't':
|
||||
add(my.a, '\t')
|
||||
inc(pos, 2)
|
||||
of 'v':
|
||||
add(my.a, '\v')
|
||||
inc(pos, 2)
|
||||
of 'u':
|
||||
if my.rawStringLiterals:
|
||||
add(my.a, 'u')
|
||||
|
||||
Reference in New Issue
Block a user