francoispqt / gojay

high performance JSON encoder/decoder with stream API for Golang
MIT License
2.11k stars 112 forks source link

Fix interface decoding when string has escape sequence #156

Closed anadav closed 4 years ago

anadav commented 4 years ago

Decoding of a string using the interface API fails when a string has an escape sequence. Go's native JSON decoding function is called in such a case, and it expects to get the original string. Provide the raw string to prevent the failures that are currently caused.

Adding a test for this specific scenario.

anadav commented 4 years ago

Will resubmit

skidder commented 3 years ago

@anadav - Was this PR closed for any reason other than the need for unit tests? It seems like a pretty important fix.