circlecell / jsonlint.com

[OLD] Please go to new source, link below.

Home Page:https://github.com/circlecell/jsonlint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Characters being escaped when they shouldn't

lucas2595 opened this issue · comments

When I input:

{
    "quotationmark": "\"",
    "solidus": "\\",
    "reversesolidus": "\/",
    "backspace": "\b",
    "formfeed": "\f",
    "newline": "\n",
    "carriagereturn": "\r",
    "horizontaltab": "\t",
    "unicode": "\u00e7"
}

According to https://www.json.org/json-en.html, I expect it to be kept as is.
image

But the reverse solidus and the unicode sequence get broken when I validate:

{
    "quotationmark": "\"",
    "solidus": "\\",
    "reversesolidus": "\\/",
    "backspace": "\b",
    "formfeed": "\f",
    "newline": "\n",
    "carriagereturn": "\r",
    "horizontaltab": "\t",
    "unicode": "\\u00e7"
}

Hope this will be fixed soon. Can't use jsonlint when editing JSON-objects where there are text in norwegian or swedish, since double backslashes are added to every "foreign" letter such as \u00f8 and \u00e5.

This should be fixed now.