# v0.3.5 (2023-02-10) Theme: Compatibility bugfixes User-facing changes: - Decoder: Fixes a bug where if an EOF is encountered, the reader is appended to, then another Decode is attempted, that EOF 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 lowmemjson uses git.lukeshu.com/go/typedsync.CacheMap (since lowmemjson v0.3.1), which when compiled with Go 1.20 makes use of Go 1.20 language features. However, because lowmemjson's `go.mod` said `go 1.18`, those language features are disabled and compilation fails (see [go#58342][]). To work around this, lowmemjson's `go.mod` now says `go 1.20`. Despite this, lowmemjson still works fine with Go 1.18. [go#58342]: https://github.com/golang/go/issues/58342 # v0.3.3 (2023-02-04) Theme: Bugfix User-facing changes: - ReEncoder: Fixes a regression in v0.3.1 where it erroneously enters compact mode when CompactIfUnder is set and write barriers are in use. - ReEncoder: Fixes a regression in v0.3.1 where it sometimes emits extra (but syntactically valid) newlines when write barriers are in use. # v0.3.2 (2023-02-03) Theme: Bugfix User-facing changes: - ReEncoder: Fixes a regression in v0.3.1 where it sometimes emits extra (but syntactically valid) newlines. # v0.3.1 (2023-01-31) Theme: Performance This release does a bunch of performance tuning and optimizations, with no user-visible changes other than memory consumption and CPU time. Based on benchmarks with a real-world use-case, it is now roughly an order of magnitude faster, with much lower memory consumption (the big-O of memory consumption was always pretty low, but there were some big constant factors before). # v0.3.0 (2023-01-30) Theme: Breaking changes This release makes a breaking change to the way *ReEncoder works. This change both better fits what's convenient to use, and enables making future performance improvements. Breaking changes: - ReEncoder: Instead of instantiating a `*ReEncoder` with ```go reenc := &lowmemjson.ReEncoder{Out: w, settings} ``` it is now instantiated with ```go reenc := lowmemjson.NewReEncoder(w, lowmemjson.ReEncoderConfig{settings}) ``` # v0.2.1 (2023-01-30) Theme: Code quality This release improves code quality; getting various linters to pass, adding tests (and a few bug-fixes), refactoring things to be clearer, fixing some mistakes in the documentation. User-facing changes: - Encoder: `*EncodeMethodError` is now also used when a method produces invalid JSON. - Decoder: The offset in `*DecodeTypeError`s now correctly point the start of the value, rather than somewhere in the middle of it. # v0.2.0 (2023-01-26) Theme: Add documentation This release doesn't make any major changes, and is just adding documentation. I have removed a few minor things that I didn't want to write documentation for. Breaking changes: - Drop the following shorthand functions: + `func Decode(r io.RuneScanner, ptr any) error { return NewDecoder(r).Decode(ptr) }` + `func DecodeThenEOF(r io.RuneScanner, ptr any) error { return NewDecoder(r).DecodeThenEOF(ptr) }` + `func Encode(w io.Writer, obj any) (err error) { return NewEncoder(w).Encode(obj) }` - Drop `const Tab = "\t"`. # v0.1.0 (2022-09-19) Theme: Initial release