I guess I should mention that I'm finding these issues by fuzzing my own JSON parser against encoding/json. My implementation is GPL, but I'm 100% willing to re-license it for incorporation in to the stdlib if there's anything that you'd like to steal.
In particular, compat/json/compat_test.go is some tests that may be worth stealing; they are tests that I felt necessary to add even though my implementation already passed encoding/json's existing test suite (which I have copied in the borrowed_*_test.go files).
What version of Go are you using (
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
What did you do?
I fed the JSON parser a truncated JSON document that has a backslash as the final rune.
What did you expect to see?
I expected the error to be
unexpected end of JSON input
What did you see instead?
I saw the error
character in the input at all!
invalid character ' ' in string escape code, which is a nonsense error as there is no
json.Indenthave the same issue, while
The text was updated successfully, but these errors were encountered: