JDK 28's Built-in JSON API: Fetch and Map to Records With No Libraries
therealdanvega · x · 2026-10-15
The author demos JDK 28's new built-in JSON API (JEP 540) to fetch JSON from an API and map it to Java records, with no Jackson, Gson or any other dependency.
- Just HttpClient plus the new JSON API
- Companion GitHub repo native-json-demo shows parsing, reading and writing
- Tested on macOS Apple Silicon with OpenJDK 28-ea+19, requires the incubator module jdk.incubator.json
- No Maven or Gradle; run with java --add-modules jdk.incubator.json GettingStarted.java
More from coding & agent
- Dev closes all PRs: let agents patch open source via Nix overlays instead — kieranklaassen · 2026-10-15
- Prime Sandboxes Adds Filesystem Checkpoints to Fork Agent Rollouts Mid-Trajectory — samsja19 · 2026-10-15
- Every to host behind-the-scenes session on reporting Codex with Codex — every · 2026-10-15
- x402 transactions on Base jump 65% in three quarters, Chainalysis says — kleffew94 · 2026-10-15
- Pydantic AI author boosts PiDrei, a Python port of Pi using Rust-based Monty — samuelcolvin · 2026-10-15
- Oracle ships graph-aware memory framework for AI agents with typed relations — dr_cintas · 2026-10-15