diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-17 19:21:37 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-19 14:51:04 -0700 |
commit | 49ee8be679add0bd3cf08a2669331b3be7a835f8 (patch) | |
tree | b3d3f889ed25084fe33ed9e01554d6ca51104bb5 /ReleaseNotes.md | |
parent | 00187950437a10952b82353405e5ba4b4515fb29 (diff) |
compat/json: Correctly handle syntax-error-in-decode
Diffstat (limited to 'ReleaseNotes.md')
-rw-r--r-- | ReleaseNotes.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ReleaseNotes.md b/ReleaseNotes.md index a8496e0..5e8dab7 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -13,6 +13,11 @@ default, add a `CompactFloats` ReEncoderConfig option to control this. + + Decoder: Decoding `json.Unmarshaler` or `lowmemjson.Decodable` + as a top-level value no longer needs to read past the closing + `"`/`]`/`}`; this can be significant when reading streaming + input, as that next read may block. + - Compatibility bugfixes: + compat/json.Valid: No longer considers truncated JSON @@ -32,6 +37,15 @@ + compat/json.Indent: Preserve trailing whitespace, same as `encoding/json`. + + compat/json.Decoder: No longer transforms "unexpected EOF" + errors to "unexpected end of JSON input". This makes it + different than `compat/json.Unmarshal`, but the same as + `encoding/json`. + + + compat/json.Decoder, compat/json.Unmarshal: No longer mutate + the target value at all if there is a syntax error in the + input. + - Unicode: + Feature: Encoder, ReEncoder: Add an `InvalidUTF8` |