From 483bbdc970b26d774ace39edfde8420aba53b742 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 7 Feb 2023 14:01:44 -0700 Subject: Sync borrowed code from Go 1.20 New tests mean encode.go and compat.go also need some bugfixes. --- ReleaseNotes.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ReleaseNotes.md') diff --git a/ReleaseNotes.md b/ReleaseNotes.md index f71967c..493252a 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -9,6 +9,15 @@ poisons future Decodes. This is something that `encoding/json` supports. + - Encoder: Fixes a bug where if an encode error is encountered, all + future Encode calls will fail. Reusing an Encoder is something + that `encoding/json` supports. + + - compat/json.Encoder: Now buffers the output, to avoid partial + writes if an encode error is encountered. This matches the + behavior of `encoding/json`. For memory consumption reasons, the + native lowmemjson Encoder still does not buffer. + # v0.3.4 (2023-02-05) Theme: Fix compilation with Go 1.20 -- cgit v1.2.3-2-g168b