You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 698c939
Browse filesBrowse the repository at this point in the historyBrowse files
Issue #144 Sync to last java.util.json sandbox commit c1a4f80 (2026-02-05)
This is the final sync of the java.util.json API before upstream moved
to jdk.incubator.json. Changes from upstream since our last sync:
- Added JsonValue.toInt() and JsonNumber.toInt() methods
- Improved Javadoc for all conversion methods with @implSpec sections
- Reordered valueOrNull() to end of JsonValue interface
- Minor wording improvements in error messages
Local changes preserved:
- JsonNumber.of(double) bug fix (delegate to of(String) for correct offsets)
- Utils.powExact() polyfill (Math.powExact not available in Java 21)
- StableValue.java polyfill
- JsonAssertionException.java
All 27 tests pass.
Upstream source: openjdk/jdk-sandbox@c1a4f80
Branch: json (last commit before preview->incubator move)
This code is derived from the OpenJDK jdk-sandbox repository "json" branch at commit `c1a4f80` (2026-02-05), which was the last commit before the API was moved to `jdk.incubator.json`.
The upstream `java.util.json` API has been promoted to `jdk.incubator.json` (commit `b956ae0`, 2026-02-05). The incubator version introduces significant API changes including method renames (`bool()`→`asBoolean()`, `string()`→`asString()`, etc.) and new methods (`asInt()`). A separate branch tracks the incubator upgrade — see issue #145.
296
301
297
302
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)
298
303
299
304
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.
300
305
301
306
### CI: Upstream API Tracking
302
307
303
-
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.
308
+
**Note**: The daily API tracker workflow currently targets the old `java.util.json` paths which no longer exist upstream. It needs to be updated to track `jdk.incubator.json` — see issue #145.
0 commit comments