Repository navigation
v0.12.2
A JSON Lines record of any length reads back
Summary
This release lifts the 10 MiB ceiling that the JSON Lines codec's Decode placed on one line, so a view returns every record that a writer persisted. The read contract now states that invariant.
Highlights
Decodehas no ceiling of its own: the decoder still starts with a small buffer and grows it to the longest line. Earlier releases refused a line longer than 10 MiB withbufio.Scanner: token too long, whileEncodewrote lines of any length. A record such as an 8 MiB blob encoded as base64 could be written and never read.- The contract names the invariant:
CONTRACT_READ_API.mdand theCodec.Decodedoc state thatDecodereturns every record thatEncodewrote, and that a codec boundsDecodeno more tightly thanEncode. - Tests pin both ends: a round trip of an 11 MiB record, and a table of how a decode ends, from an empty stream to a reader's error.
Full Changelog: v0.12.1...v0.12.2