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
Issue #148 scope jdt2jar Dockerfile to submodule, add GHCR publish and CI Docker builds
- Move Dockerfile from repo root to jdt2jar/ (built with -f jdt2jar/Dockerfile .)
- Add jdt2jar/.dockerignore to exclude build artifacts
- Rewrite jdt2jar/README.md with full Docker/GHCR usage instructions
- Update root README.md to signpost to jdt2jar submodule for optional tool
- Add docker-build job to ci.yml (Java 25, smoke test)
- Add docker-build job to maven.yml (Java 25, smoke test after tests pass)
- Add docker-publish job to release-on-tag.yml (pushes version + latest to ghcr.io)
- Release notes now include Docker image pull commands
How to verify:
docker build -t jdt2jar -f jdt2jar/Dockerfile .
docker run --rm jdt2jar --help
Copy file name to clipboardExpand all lines: README.md
+9-29Lines changed: 9 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,9 +336,7 @@ Such vulnerabilities existed at one point in the upstream OpenJDK sandbox implem
336
336
337
337
## JSON Type Definition (JTD) Validator
338
338
339
-
This repo contains an incubating JTD validator that has the core JSON API as its only dependency. This sub-project demonstrates how to build realistic JSON heavy logic using the API. It follows Data Oriented Programming principles: it compiles JTD schemas into an immutable structure of records. For validation it parses the JSON document to the generic structure and uses the thread-safe parsed schema and a stack to visit and validate the parsed JSON.
340
-
341
-
A complete JSON Type Definition validator is included (module: json-java21-jtd).
339
+
A complete JSON Type Definition validator is included (module: `json-java21-jtd`), implementing RFC 8927 with a stack-machine interpreter and optional bytecode codegen (JDK 24+).
342
340
343
341
### Empty Schema `{}` Semantics (RFC 8927)
344
342
@@ -350,43 +348,19 @@ Per **RFC 8927 (JSON Typedef)**, the empty schema `{}` is the **empty form** and
350
348
> `empty = {}`
351
349
> **Empty form:** A schema in the empty form accepts all JSON values and produces no errors.
352
350
353
-
⚠️ Note: Some tools or in-house validators mistakenly interpret `{}` as "object with no
354
-
properties allowed." **That is not JTD.** This implementation follows RFC 8927 strictly.
355
-
356
351
```java
357
352
importjson.java21.jtd.Jtd;
358
353
importjdk.sandbox.java.util.json.*;
359
354
360
-
// Compile JTD schema
361
-
JsonValue schema =Json.parse("""
362
-
{
363
-
"properties": {
364
-
"name": {"type": "string"},
365
-
"age": {"type": "int32"}
366
-
}
367
-
}
368
-
""");
369
-
370
-
// Validate JSON
371
-
JsonValue data =Json.parse("{\"name\":\"Alice\",\"age\":30}");
An optional `jdt2jar` CLI tool and distroless Docker image are available for offline JTD validator packaging. It compiles a JTD schema into a standalone validator JAR at build time, eliminating the JDK 24+ runtime requirement for generated validators. The generated JARs run on JDK 21+.
375
+
376
+
See [`jdt2jar/README.md`](jdt2jar/README.md) for build instructions, container usage, and the pre-built image on GitHub Container Registry (`ghcr.io`).
0 commit comments