jsonlint icon indicating copy to clipboard operation
jsonlint copied to clipboard

Problems recognizing and/or reformatting escapes

Open mattfenwick opened this issue 11 years ago • 4 comments

I've noticed a couple of issues in the reformatted output when there's escapes in the input:

  1. 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.

  2. unexpected slashes.

    • in: "\u0066"
    • expected out: "f" (or "\u0066")
    • actual out: "\\u0066"

mattfenwick avatar Oct 27 '13 14:10 mattfenwick

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

nelsonvarela avatar Jan 16 '14 10:01 nelsonvarela

:+1: - this just screwed my config as well, would be great to be fixed.

fh avatar Sep 15 '14 13:09 fh

I'm having the same problem…

alappe avatar Sep 18 '14 13:09 alappe

Same problem.

echo "C:\\example\\raw.dat">test.json
jsonlint test.json

Expected output: "C:\\example\\raw.dat" Actual output: "C:\\example\raw.dat"

petsuter avatar Feb 04 '16 09:02 petsuter