Skip to content

OpenJDK Sandbox July 2025 (d22dc2ba) - JSON Test Suite Analysis Tool

Pre-release
Pre-release

Choose a tag to compare

@simbo1905 simbo1905 released this 28 Jul 06:46
· 70 commits to main since this release

OpenJDK Sandbox Commit d22dc2ba89789041c3908cdaafadc1dcf8882ebf (July 2025)

Backport of java.util.json API from OpenJDK sandbox with comprehensive JSON Test Suite compatibility analysis tool.

Key Features

  • Standalone reporting tool - no longer blocks builds with unit test failures
  • Robust encoding detection - handles malformed UTF-8, BOM detection, UTF-16/UTF-32 encodings
  • Comprehensive API testing - tests both Json.parse(String) and Json.parse(char[]) APIs
  • Security documentation - warns about undocumented StackOverflowError vulnerabilities in upstream API
  • 99.3% JSON Test Suite conformance - processes all 318 test files with 0 skipped

Usage

# Build and download test suite
./mvnw clean compile generate-test-resources -pl json-compatibility-suite

# Run human-readable report
./mvnw exec:java -pl json-compatibility-suite

# Run JSON output
./mvnw exec:java -pl json-compatibility-suite -Dexec.args="--json"

Test Results

  • Valid JSON: 97.9% success rate (93/95 files pass)
  • Invalid JSON: 100% success rate (correctly rejects all invalid JSON)
  • Implementation-defined: 35 edge cases handled per implementation choice
  • 2 duplicate key failures: Implementation choice to reject for data integrity

Security Notes

This release includes documentation of undocumented security vulnerabilities in the upstream API, including stack exhaustion attacks that can leave applications in undefined states.

This is an unstable API backport for educational and experimental usage only.