jsonlint
jsonlint copied to clipboard
Problems recognizing and/or reformatting escapes
I've noticed a couple of issues in the reformatted output when there's escapes in the input:
-
disappearing slashes. This represents a two-character string, not a newline escape:
- in:
"\\n"
- expected out:
"\\n"
- actual out:
"\n"
This also happens for b, r, f, and t.
- in:
-
unexpected slashes.
- in:
"\u0066"
- expected out:
"f"
(or"\u0066"
) - actual out:
"\\u0066"
- in:
Can anyone please take a look at this?
I have the same problem:
in: "\u00e9\u00e9"
expected: "éé"
actual: "\\u00e9\\u00e9"
It works perfect when using the webiste: http://www.jsonlint.com
:+1: - this just screwed my config as well, would be great to be fixed.
I'm having the same problem…
Same problem.
echo "C:\\example\\raw.dat">test.json
jsonlint test.json
Expected output: "C:\\example\\raw.dat"
Actual output: "C:\\example\raw.dat"