diff --git a/.github/workflows/release-on-branch.yml b/.github/workflows/release-on-branch.yml
deleted file mode 100644
index ea1a0dc..0000000
--- a/.github/workflows/release-on-branch.yml
+++ /dev/null
@@ -1,72 +0,0 @@
-name: Release on Tag
-
-on:
- push:
- tags:
- - 'releases/*'
-
-permissions:
- contents: write # push tags, push commits
- pull-requests: write
-
-concurrency:
- group: release-${{ github.ref }}
- cancel-in-progress: false
-
-jobs:
- release:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
-
- - name: Set up Java, Central creds and GPG
- uses: actions/setup-java@v4
- with:
- distribution: temurin
- java-version: '21'
- cache: maven
- server-id: central
- server-username: CENTRAL_USERNAME
- server-password: CENTRAL_PASSWORD
- gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
- gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
-
- - name: Create GitHub Release with notes
- uses: softprops/action-gh-release@v2
- with:
- tag_name: ${{ github.ref_name }}
- generate_release_notes: true
-
- - name: Build and Deploy to Central
- env:
- CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
- CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
- run: |
- mvn -B -ntp clean deploy
-
- - name: Configure Git identity
- run: |
- git config user.name "github-actions[bot]"
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
-
- - name: Create branch from tag for PR
- id: prbranch
- run: |
- BRANCH_NAME="release-bot-$(date +%Y%m%d-%H%M%S)"
- git checkout -B "$BRANCH_NAME" $GITHUB_SHA
- git push origin "$BRANCH_NAME"
- echo "branch=$BRANCH_NAME" >> "$GITHUB_OUTPUT"
-
- - name: Open PR back to main
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- gh pr create \
- --title "chore: merge release ${{ github.ref_name }} to main" \
- --body "Automated PR created from tag ${{ github.ref_name }}." \
- --base main \
- --head "${{ steps.prbranch.outputs.branch }}" \
- || echo "PR already exists or nothing to compare"
diff --git a/.gitignore b/.gitignore
index 2d6e6d2..907f4af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.env
+repomix-output*
target/
.idea/
diff --git a/README.md b/README.md
index e08e6a6..7180647 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,11 @@
-# java.util.json Backport for JDK 21
+# java.util.json – Backport for Java 21 (OpenJDK sandbox)
-Early access to the unstable `java.util.json` API — taken from the OpenJDK jdk-sandbox “json” branch as of 2025-09-04.
+Experimental backport of the proposed `java.util.json` API from the OpenJDK jdk‑sandbox “json” branch for use on Java 21+.
+This project is not an official release; APIs and behavior may change as upstream evolves.
+
+References:
+- OpenJDK sandbox “json” branch: https://github.com/openjdk/jdk-sandbox/tree/master/src/java.json
+- Design paper: [Towards a JSON API for the JDK.pdf](Towards%20a%20JSON%20API%20for%20the%20JDK.pdf)
## Quick Start
@@ -43,7 +48,7 @@ JsonValue backToJson = Json.fromUntyped(Map.of(
));
```
-## Back Port Project Goals
+## Backport Project Goals
- **✅Enable early adoption**: Let developers try the unstable Java JSON patterns today on JDK 21+
- **✅API compatibility over performance**: Focus on matching the emerging "batteries included" API design rather than competing with existing JSON libraries on speed.
@@ -82,7 +87,7 @@ This is a simplified backport with the following changes from the original:
These vulnerabilities exist in the upstream OpenJDK sandbox implementation and are reported here for transparency.
-## JSON Schema Validator
+## JSON Schema Validator (2020-12)
By including a basic schema validator that demonstrates how to build a realistic feature out of the core API. To demonstrate the power of the core API, it follows Data Oriented Programming principles: it parses JSON Schema into an immutable structure of records, then for validation it parses the JSON to the generic structure and uses the thread-safe parsed schema as the model to validate the JSON being checked.
@@ -99,7 +104,7 @@ var result = schema.validate(
// result.valid() => true
```
-Compatibility: we run the official 2020-12 JSON Schema Test Suite on verify; in strict mode it currently passes about 71% of applicable cases.
+Compatibility: runs the official 2020‑12 JSON Schema Test Suite on `verify`; in strict mode it currently passes about 71% of applicable cases.
## Building
diff --git a/json-compatibility-suite/pom.xml b/json-compatibility-suite/pom.xml
index 7397141..39feda5 100644
--- a/json-compatibility-suite/pom.xml
+++ b/json-compatibility-suite/pom.xml
@@ -6,19 +6,20 @@
io.github.simbo1905.json
- json-java21-parent
+ parent
0.1.0
json-compatibility-suite
jar
- JSON Compatibility Suite
+ java.util.json Java21 Backport – JSON Test Suite
+ Runs the official JSON Test Suite against the java.util.json Java 21 backport to track conformance with JSON standards.
io.github.simbo1905.json
- json-java21
+ java.util.json
${project.version}
diff --git a/json-java21-api-tracker/pom.xml b/json-java21-api-tracker/pom.xml
index f1ada19..a687fe4 100644
--- a/json-java21-api-tracker/pom.xml
+++ b/json-java21-api-tracker/pom.xml
@@ -6,14 +6,15 @@
io.github.simbo1905.json
- json-java21-parent
+ parent
0.1.0
json-java21-api-tracker
jar
- API Tracker
+ java.util.json Java21 Backport Upstream API Tracker
+ Compares the OpenJDK sandbox java.util.json API to this Java 21 backport and reports differences to track upstream changes. Experimental tooling.
21
@@ -22,7 +23,7 @@
io.github.simbo1905.json
- json-java21
+ java.util.json
${project.version}
diff --git a/json-java21-schema/pom.xml b/json-java21-schema/pom.xml
index 35629f2..3e518c2 100644
--- a/json-java21-schema/pom.xml
+++ b/json-java21-schema/pom.xml
@@ -7,13 +7,14 @@
io.github.simbo1905.json
- json-java21-parent
+ parent
0.1.0
- json-java21-schema
+ java.util.json.schema
jar
- JSON Schema Validator
+ java.util.json Java21 Backport – JSON Schema Validator (2020-12)
+ Experimental JSON Schema 2020-12 validator built using the java.util.json Java 21 backport; includes integration tests running the official JSON Schema Test Suite.
UTF-8
diff --git a/json-java21/pom.xml b/json-java21/pom.xml
index 131453c..56529ba 100644
--- a/json-java21/pom.xml
+++ b/json-java21/pom.xml
@@ -6,14 +6,15 @@
io.github.simbo1905.json
- json-java21-parent
+ parent
0.1.0
- json-java21
+ java.util.json
jar
- java.util.json Backport
+ java.util.json Java21 Backport
+ Backport of the OpenJDK sandbox java.util.json API adapted for Java 21+. Experimental; APIs and behavior may change as upstream evolves.
diff --git a/pom.xml b/pom.xml
index 3816158..dcc49f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,12 +5,12 @@
4.0.0
io.github.simbo1905.json
- json-java21-parent
+ parent
0.1.0
pom
- java.util.json Backport Parent
- A backport of the upcoming java.util.json API for Java 21+
+ java.util.json Java21 Backport Parent
+ Backport of the OpenJDK jdk-sandbox java.util.json sources adapted for Java 21+. Experimental and subject to change; not an official OpenJDK release.
https://simbo1905.github.io/java.util.json.Java21/
diff --git a/scripts/setup-release-secrets.zsh b/scripts/setup-release-secrets.zsh
index 64070c9..2164b0d 100755
--- a/scripts/setup-release-secrets.zsh
+++ b/scripts/setup-release-secrets.zsh
@@ -65,6 +65,13 @@ else
fi
fi
+# Also persist a key name (fingerprint) for maven-gpg-plugin selection
+KEY_FPR=$(gpg --with-colons --list-secret-keys "$GPG_KEY_ID" 2>/dev/null | awk -F: '$1=="fpr"{print $10; exit}')
+if [[ -n "$KEY_FPR" ]]; then
+ echo "Setting GPG_KEYNAME (fingerprint) for CI: $KEY_FPR"
+ print -r -- "$KEY_FPR" | gh secret set GPG_KEYNAME --app actions ${REPO_FLAG:+${REPO_FLAG[@]}} || true
+fi
+
print -r -- "$GPG_PASSPHRASE" | gh secret set GPG_PASSPHRASE --app actions ${REPO_FLAG:+${REPO_FLAG[@]}}
echo "Validating secrets presence..."