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
|`json-compatibility-suite`| JSON Test Suite conformance reporter (tests against [nst/JSONTestSuite](https://github.com/nst/JSONTestSuite)) | 21+ |
22
22
|`json-java21-api-tracker`| Daily upstream API drift detector — fetches OpenJDK sandbox sources, compares public API signatures, reports differences | 25+ |
@@ -393,9 +393,9 @@ Jtd.Result result = validator.validate(schema, data);
393
393
394
394
## JTD to JAR Compiler (Optional)
395
395
396
-
An optional `jdt2jar` CLI tool and distroless Docker image are available for pre-compiling JTD schemas into standalone validator JARs at build time. This eliminates the JDK 24+ runtime requirement for generated validators — the JARs run on JDK 21+.
396
+
An optional `jtd2jar` CLI tool and distroless Docker image are available for pre-compiling JTD schemas into standalone validator JARs at build time. This eliminates the JDK 24+ runtime requirement for generated validators — the JARs run on JDK 21+.
397
397
398
-
See [`jdt2jar/README.md`](jdt2jar/README.md) for build instructions, container usage, and the pre-built image on GitHub Container Registry (`ghcr.io`).
398
+
See [`jtd2jar/README.md`](jtd2jar/README.md) for build instructions, container usage, and the pre-built image on GitHub Container Registry (`ghcr.io`).
Copy file name to clipboardExpand all lines: jtd2jar/README.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,21 @@
1
-
# jdt2jar
1
+
# jtd2jar
2
2
3
-
`jdt2jar` compiles a JTD schema into a standalone validator JAR at build time. The generated JAR runs on JDK 21+ with no JDK 25+ runtime dependency.
3
+
`jtd2jar` compiles a JTD schema into a standalone validator JAR at build time. The generated JAR runs on JDK 21+ with no JDK 25+ runtime dependency.
4
4
5
5
## Use Case
6
6
7
7
This tool bridges the gap between the interpreter and codegen paths:
8
8
9
9
-**Interpreter** ([`json-java21-jtd`](../json-java21-jtd/README.md)): ideal for infrequent config parsing — simple, no build step, runs on JDK 21+.
10
10
-**Codegen** ([`json-java21-jtd-codegen`](../json-java21-jtd-codegen/README.md)): ideal for repeated hot-path validation — ~9x faster, but requires JDK 25+ at runtime.
11
-
-**jdt2jar**: pre-compiles schemas into validator JARs at build time (using JDK 25+), then deploys them to any JDK 21+ runtime. Best for CI/CD pipelines, distroless containers, or environments where you want JIT-optimised validators without shipping a JDK 25+ runtime.
11
+
-**jtd2jar**: pre-compiles schemas into validator JARs at build time (using JDK 25+), then deploys them to any JDK 21+ runtime. Best for CI/CD pipelines, distroless containers, or environments where you want JIT-optimised validators without shipping a JDK 25+ runtime.
12
12
13
13
> **Future note**: `java.util.json` has entered the JDK incubator (`jdk.incubator.json`). Once the API stabilises in the JDK itself, generated bytecode validators can depend directly on future JDK classes rather than this backport, making them even more efficient with zero library overhead.
14
14
15
15
## CLI
16
16
17
17
```bash
18
-
jdt2jar<schema.json> [options]
18
+
jtd2jar<schema.json> [options]
19
19
```
20
20
21
21
Options:
@@ -35,24 +35,26 @@ A minimal distroless container image is available for offline schema compilation
> **Name change**: releases up to and including `2026.08.30` published this image under the misspelled name `ghcr.io/simbo1905/java.util.json.java21/jdt2jar`. Those tags remain on GHCR but are frozen; re-point to `jtd2jar`.
43
+
42
44
### Build Locally
43
45
44
46
Requires Docker and JDK 25+ (for the build stage). Build from the repository root:
45
47
46
48
```bash
47
-
docker build -t jdt2jar -f jdt2jar/Dockerfile .
49
+
docker build -t jtd2jar -f jtd2jar/Dockerfile .
48
50
```
49
51
50
52
### Usage
51
53
52
54
The container's working directory is `/work`. Mount your project directory there:
53
55
54
56
```bash
55
-
docker run --rm -v "$(pwd):/work"jdt2jar:latest schema.jtd.json --output schema-validator.jar --main
57
+
docker run --rm -v "$(pwd):/work"jtd2jar:latest schema.jtd.json --output schema-validator.jar --main
0 commit comments