diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-20 12:47:10 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-20 12:47:10 -0700 |
commit | f5ca3478c68e47ae20fd12748c1552fdf81f75f9 (patch) | |
tree | b3d3f889ed25084fe33ed9e01554d6ca51104bb5 /ReleaseNotes.md | |
parent | d240d0b06c7b5711f583d961eddfc37d07d4546e (diff) | |
parent | 49ee8be679add0bd3cf08a2669331b3be7a835f8 (diff) |
Merge branch 'lukeshu/fixes'
Diffstat (limited to 'ReleaseNotes.md')
-rw-r--r-- | ReleaseNotes.md | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 081644e..5e8dab7 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,86 @@ +# v0.3.7 (TBD) + + Theme: TBD + + User-facing changes: + + - General Changes: + + + Encoder, ReEncoder: Now correctly trims unnecessary the + trailing '0's from the fraction-part when compacting numbers. + + + ReEncoder: No longer compact floating-point numbers by + 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 + documents to be valid. + + + compat/json.Compact, compat/json.Indent: Don't write to the + destination buffer if there is a syntax error. + + + compat/json.Compact, compat/json.Indent: No longer compact + floating-point numbers; as `encoding/json` doesn't. + + + compat/json.HTMLEscape: Just look for problematic UTF-8 runes, + don't actually parse as JSON. This is consistent with the + function's lack of an `error` return value, and with the + behavior of `encoding/json`. + + + 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` + ReEncoderConfig option and `BackslashEscapeRawByte` + BackslashEscapeMode to allow emitted strings to contain + invalid UTF-8. + + + Feature: ReEncoder: No longer unconditionally normalizes + `\uXXXX` hex characters to lower-case; now this is controlled + by the `BackslashEscaper` (and the default is now to leave the + capitalization alone). + + + Change: EscapeDefault, EscapeDefaultNonHTMLSafe: No longer + force long Unicode `\uXXXX` sequences for the U+FFFD Unicode + replacement character. + + + Change: Encoder: Unless overridden by the BackslashEscaper, + now by default uses `\uXXXX` sequences when emitting the + U+FFFD Unicode replacement character in place of invalid + UTF-8. + + + Bugfix: Encoder, ReEncoder: Fix an issue with decoding UTF-8 + that when a codepoint straddles a write boundary it is + interpreted as a sequence of U+FFFD runes. + + + Bugfix: compat/json.Valid: Do not consider JSON containing + invalid UTF-8 to be valid (this is different than + `encoding/json` at the time of this writing; but I consider + that to be a bug in `encoding/json`; [go#58517][]). + + + Bugfix: compat/json.Compact, compat/json.Indent: Don't munge + invalid UTF-8 in strings; as `encoding/json` doesn't. + + [go#58517]: https://github.com/golang/go/issues/58517 + # v0.3.6 (2023-02-16) Theme: Architectural improvements |