zaach / jsonlint

A JSON parser and validator with a CLI.
http://zaach.github.com/jsonlint/
1.93k stars 417 forks source link

jsonlint does not properly process double backslash #139

Open HouzuoGuo opened 2 years ago

HouzuoGuo commented 2 years ago

Merry Christmas and happy new year!

I noticed this bug when I tried to format a string that looks like a Windows file path. Here's a minimal example:

echo '{"a": "\\\\b\\\\"}' | jsonlint
{
  "a": "\b\\"
}

The value of a string should have been \\b\\.