Skip to content

v2.7.0-rc.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@fxamacker fxamacker released this 17 Jun 04:15
· 65 commits to master since this release
04bb1e7

What's Changed Since v2.6.0

v2.7.0 adds features and improvements that help large projects (e.g. Kubernetes) use CBOR as an alternative to JSON and Protocol Buffers. Other improvements include speedups, improved memory use, bug fixes, decoding/encoding options, etc.

Special thanks to @benluddy for contributing features, optimizations, improvements, bug fixes, and discussions! 👍

⭐ Features and Optimizations

  • Add decoding option TimeTagToAny to produce RFC3339 when decoding time into interface{} by @ssuriyan7 in #506
  • Bypass sorting overhead for single-entry maps. by @benluddy in #516
  • Add decode option to allow rejecting inputs that contain certain simple values. by @benluddy in #481
  • Allow rejection of NaN and Inf float values on encode and decode. by @benluddy in #513
  • Add SortMode to encode struct fields in a less predictable order. by @benluddy in #515
  • Add a decoding option to allow decoding byte string into time.Time. by @benluddy in #524
  • Encode structs directly to output buffer. by @benluddy in #519
  • Support automatic conversion between text and binary string representations by @benluddy in #476
  • Add a method for marshaling directly into a user-provided buffer. by @benluddy in #521
  • Add options to disable BinaryMarshaler/BinaryUnmarshaler support. by @benluddy in #526
  • Add option to reject decoding bignum tags and encoding big.Int. by @benluddy in #527
  • Improve speed & memory use for Diagnose() and DiagnoseFirst() by @benluddy in #533
  • Refactor sorted map encode to use fewer buffers for nested maps. by @benluddy in #537
  • Allow user to specify buffer by adding cbor.MarshalToBuffer(), UserBufferEncMode interface, etc. by @fxamacker in #553

🛠 Improvements

Improvements focused on fixing or updating new features. For bug fixes to features that were already released, see 🐞 Bug Fixes.

  • Refactor to reuse functions and improve code coverage by @fxamacker in #531
  • Fix invalid RFC 3339 in TimeTagToAny (unreleased new feature) by @benluddy in #540
  • Refactor and improve code by @fxamacker in #542
  • Use "cbor:" prefixed error msg when decoding with non-default TimeTagToAnyMode setting by @fxamacker in #544
  • Disable conflicting encode options when marshaling cbor.Tag. by @benluddy in #546
  • Improve byte string format decoding options by @fxamacker in #550
  • Replace *errors.errorString with InadmissibleTagContentTypeError by @fxamacker in #552
  • Rename ByteSliceMode to ByteSliceLaterFormatMode, etc by @fxamacker in #554
  • Fix panic using SortFastShuffle (unreleased new feaure) to encode a struct with no fields. by @benluddy in #556

🐞 Bug Fixes

  • Check well-formedness of data from MarshalCBOR by @fxamacker in #485
  • Treat map keys matching the same struct field as duplicates. by @benluddy in #492
  • Decouple time.Time parsing from empty interface behavior. by @benluddy in #503

Other changes

Details

Full Changelog

Full Changelog: v2.6.0...v2.7.0-rc.0