Skip to content

Commit e41543f

Browse files
committed
Update README for upstream commit 4de0eb4 and fix Eclipse gitignore
- Update upstream reference to 4de0eb4f0c867df2d420501cf6741e50dee142d9 (2024-10-10) - Fix API examples: JsonNumber uses toNumber().intValue() not intValue() - Update conformance to 99.3% - Update CI section to reflect auto-issue creation for API drift - Clarify security section about recursive parser - Fix typos throughout - Add Eclipse project files to .gitignore
1 parent 1ffcc80 commit e41543f

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ target/
77

88
.idea/
99

10+
# Eclipse
11+
.classpath
12+
.project
13+
.settings/
14+
1015
.claude/
1116
.aider*
1217
CLAUDE.md

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,15 @@ mvn exec:java -pl json-compatibility-suite -Dexec.args="--json"
229229

230230
## Current Status
231231

232-
This code (as of 2025-09-04) is derived from the OpenJDK jdk-sandbox repository json branch at commit [a8e7de8b49e4e4178eb53c94ead2fa2846c30635](https://github.com/openjdk/jdk-sandbox/commit/a8e7de8b49e4e4178eb53c94ead2fa2846c30635) ("Produce path/col during path building", 2025-08-14 UTC).
232+
This code (as of 2026-01-25) is derived from the OpenJDK jdk-sandbox repository "json" branch at commit [4de0eb4f0c867df2d420501cf6741e50dee142d9](https://github.com/openjdk/jdk-sandbox/commit/4de0eb4f0c867df2d420501cf6741e50dee142d9) ("initial integration into the JDK repository", 2024-10-10 UTC).
233233

234234
The original proposal and design rationale can be found in the included PDF: [Towards a JSON API for the JDK.pdf](Towards%20a%20JSON%20API%20for%20the%20JDK.pdf)
235235

236-
The JSON compatibitlity tests in this repo suggest 99% conformance with a leading test suite when in "strict" mode. The two conformance expecatations that fail assume that duplicated keys in a JSON document are okay. The upstream code at this time appear to take a strict stance that it should not siliently ignore duplicate keys in a json object.
236+
The JSON compatibility tests in this repo suggest 99.3% conformance with a leading test suite. The two conformance expectations that fail assume that duplicate keys in a JSON document are okay. The upstream code takes a strict stance that it should not silently ignore duplicate keys in a JSON object.
237237

238238
### CI: Upstream API Tracking
239239

240-
A daily workflow runs an API comparison against the OpenJDK sandbox and prints a JSON report. Implication: differences do not currently fail the build or auto‑open issues; check the workflow logs (or adjust the workflow to fail on diffs) if you need notifications.
240+
A daily workflow runs an API comparison against the OpenJDK sandbox and prints a JSON report. API drift is automatically detected and issues are created when differences are found, with fingerprint deduplication to avoid duplicate issues for the same drift.
241241

242242
## Modifications
243243

@@ -248,12 +248,12 @@ This is a simplified backport with the following changes from the original:
248248

249249
## Security Considerations
250250

251-
**⚠️ This unstable API historically contained a undocumented security vulnerabilities.** The compatibility test suite (documented below) includes crafted attack vectors that expose these issues:
251+
**⚠️ This unstable API contains known security considerations.** The parser uses recursion internally which means:
252252

253253
- **Stack exhaustion attacks**: Deeply nested JSON structures can trigger `StackOverflowError`, potentially leaving applications in an undefined state and enabling denial-of-service attacks
254254
- **API contract violations**: The `Json.parse()` method documentation only declares `JsonParseException` and `NullPointerException`, but malicious inputs can trigger undeclared exceptions
255255

256-
Such vulnerabilities existed at one point in the upstream OpenJDK sandbox implementation and were reported here for transparency. Until the upstream code is stable it is probably better to assume that such issue or similar may be present or may reappear. If you are only going to use this library in small cli programs where the json is configuration you write then you will not parse objects nested to tens of thousands of levels designed crash a parser. Yet you should not at this tiome expose this parser to the internet where someone can choose to attack it in that manner.
256+
The upstream OpenJDK sandbox implementation uses a recursive descent parser. Until the upstream code is stable it is probably better to assume that such issues or similar may be present or may reappear. If you are only going to use this library in small CLI programs where the JSON is configuration you write, then you will not parse objects nested to tens of thousands of levels designed to crash a parser. However, you should not at this time expose this parser to the internet where someone can choose to attack it in that manner.
257257

258258
## JSON Type Definition (JTD) Validator
259259

0 commit comments

Comments
 (0)