Skip to content

Releases: SkaticNET/bedrock-jsonfix

v2.0.1

Choose a tag to compare

@DavidxDGM DavidxDGM released this 03 Sep 18:29

Changelog

v2.0.1 — 2026-09-03

Fixed

  • Legacy Bedrock JSON containing Windows-1252 bytes is now converted to valid
    UTF-8 before JSON validation.
  • Raw Minecraft § formatting bytes no longer make manifests fail or become
    Unicode replacement characters.
  • Mixed files keep their already-valid UTF-8 sequences while only invalid
    single bytes are repaired.
  • Existing recovery for comments, trailing commas, control bytes, BOMs, and
    surrounding non-JSON data remains unchanged.

Compatibility

  • No public API changes.
  • Module path remains github.com/SkaticNET/bedrock-jsonfix/v2.

Validation

  • go test ./... -count=1
  • go vet ./...
  • go build ./...

v2.0.0

Choose a tag to compare

@DavidxDGM DavidxDGM released this 25 Aug 10:08

Changelog

v2.0.0 — 2026-08-25

  • Breaking: the module path is now
    github.com/SkaticNET/bedrock-jsonfix/v2.
  • The public API is Fix([]byte) ([]byte, error).
  • Bedrock JSON repairs cover BOMs, comments, trailing commas, control bytes,
    and surrounding non-JSON data.
  • The fixer preserves JSON member spelling and source ordering while producing
    valid JSON.

v1.2.2

Choose a tag to compare

@DavidxDGM DavidxDGM released this 25 Aug 09:54

Changelog

v1.2.2 — 2026-08-25

  • Reduced the public API to Fix([]byte) ([]byte, error).
  • Kept the Bedrock JSON repairs for BOMs, comments, trailing commas, control
    bytes, and surrounding non-JSON data.
  • Removed configurable parser modes, reports, reader helpers, CLI tools, and
    duplicate examples.
  • Preserved JSON member spelling and source ordering while producing valid JSON.

v1.2.0

Choose a tag to compare

@DavidxDGM DavidxDGM released this 04 Jun 16:18

Changes

  • Raised the default safety limits to 128 MiB input and 512 MiB output for larger Bedrock resource pack JSON files.
  • Treat block comments as whitespace so cleanup cannot merge adjacent JSON tokens.
  • Make FixReader check context cancellation while reading chunked input.
  • Avoid copying input that is already valid UTF-8.
  • Added benchmarks and an optional compatibility test for Mojang's bedrock-samples resource pack JSON files.

Validation

  • go test ./... -count=1
  • go vet ./...
  • BEDROCK_SAMPLES_RESOURCE_PACK_DIR=<bedrock-samples>/resource_pack go test ./bedrockjsonfix -run TestOfficialBedrockSamplesResourcePackJSON -count=1
  • go test ./bedrockjsonfix -run ^$ -bench BenchmarkFixBytes -benchmem -benchtime=100ms

v1.1.0

Choose a tag to compare

@DavidxDGM DavidxDGM released this 14 Feb 23:53

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.

v1.0.0

Choose a tag to compare

@DavidxDGM DavidxDGM released this 14 Feb 22:19