Skip to content

v1.1.0

Choose a tag to compare

@DavidxDGM DavidxDGM released this 14 Feb 23:53
· 15 commits to main since this release

Full Changelog: v1.0.0...v1.1.0

Changelog v1.1.0

Added

  • Added configurable root scan behavior through RootPolicy.
  • Added RootScanMaxCandidates to limit the number of root candidates evaluated during recovery.
  • Added WrongStartMaxOffset to control how far the parser may search for a valid JSON root after leading invalid data.
  • Added RootValidator callback support, allowing applications to validate or reject recovered root candidates.
  • Added new tests covering root scanning, multiple root candidates, leading junk handling, and invalid document scenarios.

Improved

  • Improved JSON recovery logic to provide more predictable and controllable root selection.
  • Reduced the risk of selecting an unintended JSON object or array when malformed data exists before the actual document.
  • Enhanced recovery behavior for files containing leading junk bytes or corrupted prefixes.

Fixed

  • Fixed TrimmedLeadingJunkBytes reporting when root scanning selects a later candidate.
  • Fixed root scan accounting to correctly reflect the amount of discarded leading data.
  • Improved consistency of recovery results across malformed JSON inputs.

Compatibility

  • No API-breaking changes for existing users.
  • Applications relying on the previous aggressive root scanning behavior may wish to explicitly use RootPolicyScanBestEffort to preserve the old behavior.