Skip to content

v2.5.0-beta3

Pre-release
Pre-release
Compare
Choose a tag to compare
@fxamacker fxamacker released this 16 May 04:45
· 217 commits to master since this release
a52d9a5

This release adds 4 new functions: UnmarshalFirst, Diagnose, DiagnoseFirst, and Wellformed. In addition Valid function is deprecated (use Wellformed instead).

  • UnmarshalFirst decodes first CBOR data item and returns remaining bytes. This is useful for CBOR Sequences (RFC 8742) and also because Unmarshal was fixed in v2.5.0-beta to return ExtraneousDataError if there are remaining bytes.
  • Diagnose and DiagnoseFirst returns human-readable Extended Diagnostic Notation (RFC 8610 Appendix G) for the given CBOR encoding. These are useful for debugging and allows more user-friendly error logging.

What's Changed (since v2.5.0-beta2)

  • Deprecate Valid() and add Wellformed() to replace it by @fxamacker in #400
  • Add UnmarshalFirst by @immesys in #398
  • Add UnmarshalFirst to DecMode interface by @fxamacker in #402
  • Add functions for Extended Diagnostic Notation (RFC 8610 Appendix G) by @zensh in #386
  • Add more tests for Diagnose and DiagnoseFirst by @fxamacker in #405

Changes to CI and Documentation

Special Thanks

Thank you @immesys, @zensh, and @x448 for your contributions!

Full Changelog: v2.5.0-beta2...v2.5.0-beta3