codenothing / jsonlint

JSON Linter that allows comments
http://codenothing.github.com/jsonlint/
MIT License
32 stars 12 forks source link

Embedded line breaks in JSON strings #4

Open hacksalot opened 8 years ago

hacksalot commented 8 years ago

jsonlint doesn't seem to catch illegal embedded line breaks in JSON strings:

{
  "foo": "bar
bar bar bar bar"
}

Looks like the error flag is never set and .line always references the last line of the file. The JSONLint validator does return the error (well, the line number anyway), as does zaach/jsonlint.