jsonlint icon indicating copy to clipboard operation
jsonlint copied to clipboard

Problems recognizing and/or reformatting escapes

Open mattfenwick opened this issue 10 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