From b984b90f589719e4378bdee3d2cf6b929d7a28f8 Mon Sep 17 00:00:00 2001 From: Simon Massey <322608+simbo1905@users.noreply.github.com> Date: Sun, 7 Sep 2025 07:36:52 +0100 Subject: [PATCH 1/4] seo initial --- .github/workflows/release-on-branch.yml | 72 ------------------------- .gitignore | 2 + json-compatibility-suite/pom.xml | 10 ++-- json-java21-api-tracker/pom.xml | 6 +-- json-java21-schema/pom.xml | 11 ++-- json-java21/pom.xml | 6 +-- pom.xml | 4 +- scripts/setup-release-secrets.zsh | 7 +++ 8 files changed, 32 insertions(+), 86 deletions(-) delete mode 100644 .github/workflows/release-on-branch.yml 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/json-compatibility-suite/pom.xml b/json-compatibility-suite/pom.xml index 7397141..60be395 100644 --- a/json-compatibility-suite/pom.xml +++ b/json-compatibility-suite/pom.xml @@ -6,19 +6,23 @@ io.github.simbo1905.json - json-java21-parent + parent 0.1.0 json-compatibility-suite jar - JSON Compatibility Suite + java.util.json Java21 Backport JSONTestSuite + + + A module to run the official JSON Test Suite against the java.util.json backport for Java 21. + 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..42eaba0 100644 --- a/json-java21-api-tracker/pom.xml +++ b/json-java21-api-tracker/pom.xml @@ -6,14 +6,14 @@ 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 21 @@ -22,7 +22,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..dca05c7 100644 --- a/json-java21-schema/pom.xml +++ b/json-java21-schema/pom.xml @@ -7,13 +7,18 @@ 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 + + + A JSON Schema validator implementation written with the experiment java.util.json API backport for Java 21. + This module includes an integration test suite that runs the official JSON Schema Test Suite. + UTF-8 diff --git a/json-java21/pom.xml b/json-java21/pom.xml index 131453c..ba4fceb 100644 --- a/json-java21/pom.xml +++ b/json-java21/pom.xml @@ -6,14 +6,14 @@ 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 diff --git a/pom.xml b/pom.xml index 3816158..98f7d2a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,11 +5,11 @@ 4.0.0 io.github.simbo1905.json - json-java21-parent + parent 0.1.0 pom - java.util.json Backport Parent + java.util.json Java21 Backport Parent A backport of the upcoming java.util.json API for Java 21+ 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..." From dd7a327acca80ed3ea145d2d4159b2bd41beab11 Mon Sep 17 00:00:00 2001 From: Simon Massey <322608+simbo1905@users.noreply.github.com> Date: Sun, 7 Sep 2025 07:44:54 +0100 Subject: [PATCH 2/4] Issue #23 SEO: update README title/intro; enrich POM names/descriptions (verify: grep 'java.util.json' in README and run 'mvn -q help:evaluate -Dexpression=project.description' per module) --- README.md | 15 ++++++++++----- json-compatibility-suite/pom.xml | 7 ++----- json-java21-api-tracker/pom.xml | 1 + json-java21-schema/pom.xml | 8 ++------ json-java21/pom.xml | 3 ++- pom.xml | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e08e6a6..6fccef0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ -# java.util.json Backport for JDK 21 +# java.util.json – Official JSON API Backport for Java 21 -Early access to the unstable `java.util.json` API — taken from the OpenJDK jdk-sandbox “json” branch as of 2025-09-04. +Early access backport of the proposed `java.util.json` JDK API (from the OpenJDK jdk‑sandbox “json” branch) for use on Java 21+. +This project provides the standard JSON API for Java ahead of time: immutable JSON value types, parsing utilities, and examples aligned with a potential future JEP. + +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 60be395..39feda5 100644 --- a/json-compatibility-suite/pom.xml +++ b/json-compatibility-suite/pom.xml @@ -13,11 +13,8 @@ json-compatibility-suite jar - java.util.json Java21 Backport JSONTestSuite - - - A module to run the official JSON Test Suite against the java.util.json backport for Java 21. - + 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. diff --git a/json-java21-api-tracker/pom.xml b/json-java21-api-tracker/pom.xml index 42eaba0..af6ae0f 100644 --- a/json-java21-api-tracker/pom.xml +++ b/json-java21-api-tracker/pom.xml @@ -14,6 +14,7 @@ jar 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 maintain alignment with upstream. 21 diff --git a/json-java21-schema/pom.xml b/json-java21-schema/pom.xml index dca05c7..3e518c2 100644 --- a/json-java21-schema/pom.xml +++ b/json-java21-schema/pom.xml @@ -13,12 +13,8 @@ java.util.json.schema jar - java.util.json Java21 Backport JSON Schema Validator - - - A JSON Schema validator implementation written with the experiment java.util.json API backport for Java 21. - This module includes an integration test suite that runs the official JSON Schema Test Suite. - + 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 ba4fceb..3eadb38 100644 --- a/json-java21/pom.xml +++ b/json-java21/pom.xml @@ -13,7 +13,8 @@ java.util.json jar - java.util.json Java21 Backport + java.util.json Java21 Backport (Core) + Backport of the OpenJDK sandbox java.util.json API for Java 21+. Immutable JSON value types and parsing utilities aligned with the future JDK standard library. diff --git a/pom.xml b/pom.xml index 98f7d2a..31d04b9 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ pom java.util.json Java21 Backport Parent - A backport of the upcoming java.util.json API for Java 21+ + Backport of the OpenJDK sandbox java.util.json API for Java 21+. Provides immutable JSON value types and parsing utilities aligned with a potential future JDK JSON API. https://simbo1905.github.io/java.util.json.Java21/ From f5247b18b76d4b59934775c06b0067532387d68e Mon Sep 17 00:00:00 2001 From: Simon Massey <322608+simbo1905@users.noreply.github.com> Date: Sun, 7 Sep 2025 07:57:35 +0100 Subject: [PATCH 3/4] Issue #23 SEO: remove speculative language; keep neutral, non-committal descriptions --- README.md | 6 +++--- json-java21-api-tracker/pom.xml | 2 +- json-java21/pom.xml | 2 +- pom.xml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6fccef0..7180647 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# java.util.json – Official JSON API Backport for Java 21 +# java.util.json – Backport for Java 21 (OpenJDK sandbox) -Early access backport of the proposed `java.util.json` JDK API (from the OpenJDK jdk‑sandbox “json” branch) for use on Java 21+. -This project provides the standard JSON API for Java ahead of time: immutable JSON value types, parsing utilities, and examples aligned with a potential future JEP. +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 diff --git a/json-java21-api-tracker/pom.xml b/json-java21-api-tracker/pom.xml index af6ae0f..a687fe4 100644 --- a/json-java21-api-tracker/pom.xml +++ b/json-java21-api-tracker/pom.xml @@ -14,7 +14,7 @@ jar 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 maintain alignment with upstream. + Compares the OpenJDK sandbox java.util.json API to this Java 21 backport and reports differences to track upstream changes. Experimental tooling. 21 diff --git a/json-java21/pom.xml b/json-java21/pom.xml index 3eadb38..491abe6 100644 --- a/json-java21/pom.xml +++ b/json-java21/pom.xml @@ -14,7 +14,7 @@ jar java.util.json Java21 Backport (Core) - Backport of the OpenJDK sandbox java.util.json API for Java 21+. Immutable JSON value types and parsing utilities aligned with the future JDK standard library. + 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 31d04b9..dcc49f0 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ pom java.util.json Java21 Backport Parent - Backport of the OpenJDK sandbox java.util.json API for Java 21+. Provides immutable JSON value types and parsing utilities aligned with a potential future JDK JSON API. + 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/ From 3b8f83e2a96b9e7a36e26486376e5e1b20a9e8b8 Mon Sep 17 00:00:00 2001 From: Simon Massey <322608+simbo1905@users.noreply.github.com> Date: Sun, 7 Sep 2025 08:05:23 +0100 Subject: [PATCH 4/4] Issue #23 SEO: remove '(Core)' qualifier; primary artifact should be unqualified --- json-java21/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-java21/pom.xml b/json-java21/pom.xml index 491abe6..56529ba 100644 --- a/json-java21/pom.xml +++ b/json-java21/pom.xml @@ -13,7 +13,7 @@ java.util.json jar - java.util.json Java21 Backport (Core) + 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.