JDK 28

Explore how a native JSON API simplifies data handling in JDK 28.

JEP 540 has moved to Target status for JDK 28, and that's worth paying attention to.

4 min readInfoQ
Explore how a native JSON API simplifies data handling in JDK 28.

For years, Java developers have accepted a quiet tax: every project that touches JSON eventually imports a third-party library, learns its quirks, and then maintains that dependency across upgrades. JEP 540, now targeted for JDK 28, finally addresses this with a compact API for parsing and generating JSON documents without external dependencies. The proposal is deliberately modest. It offers an immutable value hierarchy, simple traversal, and conversion, all while enforcing strict syntax rules. That is not a flashy pitch. It is a practical one, and that is precisely why it matters.

Our take is that this is less about novelty and more about removing friction. The API is not trying to replace the ecosystem; it is trying to give you a solid, dependency-free baseline for core tasks. For developers, this means fewer moving parts in simple applications, less time auditing transitive dependencies, and a cleaner path for microservices that do not need the full weight of a large JSON processing framework. But do not mistake simplicity for weakness. The strict syntax rules are a feature, not a limitation. They force correctness from the start, which is more than many of us can say about our current ad-hoc parsing code. This aligns with a broader trend we are seeing, where Navigating AI/ML Job Requirements: A Shift in Expected Skills shows that the industry is increasingly demanding that developers master fundamentals rather than just library-specific APIs. The same logic applies here: if the JDK handles JSON cleanly, you spend less time on plumbing and more time on your actual logic.

What we find most encouraging is the explicit commitment to iterate based on feedback during incubation. This is not a final, frozen spec. It is an invitation. The JDK team is signaling that they want real-world usage to shape the API, which is the right approach for something this foundational. We would tell any reader who is curious to start experimenting with it as soon as an early build is available. Do not wait for the final release. Use it in a side project, test how it handles your typical JSON payloads, and see where the immutability model either helps or feels restrictive. Your feedback will genuinely influence the outcome. This is a rare chance to shape a core Java API, and it is worth the effort. The same spirit of practical evolution is visible in Explore the Future: When AI Designs Its Own Hardware, where iterative design is proving more valuable than bold proclamations. And for those of us juggling multiple platforms, the lesson from Prepare Your iOS Apps for the iPhone Duo’s Flexible Displays applies here too: adapting early to a new standard beats scrambling later.

The concrete point to watch is not the API itself, but how it handles edge cases during incubation. Strict syntax rules are easy to state and hard to get right in practice. Will it reject a trailing comma? What about duplicate keys? How does it handle deeply nested structures without blowing the stack? These details will define whether this becomes your default choice or just another tool in the drawer. For now, the smart move is to follow the JEP, test it when you can, and give feedback. Because when a language as mature as Java finally standardizes something this basic, the real value is not in what the API does today. It is in the fact that, for the first time, you might not need to add a dependency just to read a simple JSON file. That is a future worth exploring.

From InfoQ

JEP 540, Simple JSON API, has progressed to Target status for JDK 28. It introduces a compact API for parsing and generating JSON documents without external dependencies. Focused on core tasks, it provides an immutable value hierarchy. The API allows simple traversal and conversion while enforcing strict syntax rules. Feedback during incubation will shape its future development.

Read the original at InfoQ