Java’s JSON story may finally stop being so clumsy. JEP 540 proposes a simple JSON API for JDK 28, and that matters because developers keep writing the same...
JEP 540 and the Simple JSON API in JDK 28: What Java Developers Need to Know
Java’s JSON story may finally stop being so clumsy. JEP 540 proposes a simple JSON API for JDK 28, and that matters because developers keep writing the same glue code over and over again. I’m Ermenildo V Castro, and I’ve watched teams at big companies burn time on tiny parsing jobs that should have been boring years ago.
Key Takeaways- JEP 540 aims to make JSON handling easier in Java.
- The goal is a small, clean API that fits common use cases.
- It may reduce the need for extra libraries in simple apps.
- This matters most for teams that want less code and fewer dependencies.
- It is not meant to replace every serious JSON tool.
What is JEP 540 and the Simple JSON API?
JEP 540 is a proposal for a simple JSON API in JDK 28. It is meant to give Java developers a built-in way to read and write JSON without dragging in a heavy third-party package for every small task. That sounds dull. It is not. Dull is good when the job is serializing a few fields and not building a cathedral.
The basic idea is plain. Java already has a giant ecosystem, but JSON work often starts with the same mess: pick a library, learn its quirks, track its versions, and patch around a dozen edge cases. A built-in API can cut that mess down for the common case. The proposal is about simplicity, not wizardry. It is for everyday data exchange, config files, and small services that do not need a truckload of features.
I have seen this problem up close. At Google, Microsoft, Amazon, and Zulily, I saw teams spend more time arguing about JSON libraries than the JSON itself. Frankly, that is a waste. The whole point of a tool is to serve the work, not become the work. A decent API respects the dignity of the developer’s time, which is a fancy way of saying: stop making easy things hard.
If you want a broader look at Java’s direction, the official OpenJDK process is worth watching through the JEP index. For background on JSON itself, the JSON specification is still the plain standard that everything bows to.

Core Benefits of a Simple JSON API
The main benefit is less friction. That is the whole game.
- Less boilerplate: You should not need a pile of helper classes just to read a small payload.
- Fewer dependencies: Small projects often do not need Jackson, Gson, or a full framework stack.
- Cleaner onboarding: New team members can learn one standard API instead of five local patterns.
- Better default behavior: A platform API can give teams a sane starting point, which is more useful than “flexibility” that turns into chaos.
- Lower maintenance cost: Fewer external libraries means fewer upgrade headaches and fewer surprise breaks.
I remember a Zulily project where a simple API response needed two libraries, one custom mapper, and a backup parser because one team had grown used to “just in case” code. It was ugly. The work of the app was not hard, but the plumbing had become a little junk heap. Most guides praise flexibility, but they skip the bill you pay later. That bill comes due during upgrades, security scans, and late-night incidents.
The bigger win is consistency. When a core platform offers a standard path, teams stop reinventing the same wheel with different spokes. That matters in large shops and in small shops alike. Good engineering is stewardship. You do not waste effort if a simpler route does the job well.
For teams thinking about Java platform changes, the official Java technology page is a useful starting point. If you care about how APIs are shaped, the OpenJDK JEP process shows how proposals move from draft to reality.

How to Approach JEP 540 in Practice
Do not treat it like magic. It is just an API.
- Read the proposal carefully. Start with what it is designed to cover, and more importantly, what it does not try to solve. That keeps you from expecting a sports car when the thing is built for city driving.
- Map your current JSON use cases. Separate tiny config reads from serious API serialization, because those are not the same problem at all.
- Check your dependency load. If your app only uses JSON for basic reads and writes, a built-in API may let you drop one more library.
- Test against real payloads. I have seen neat APIs fall apart when they meet ugly input, weird nulls, and half-broken data from old systems.
- Keep your fallback plan. A simple API is great until you need custom codecs, strict validation, or high-end performance tricks.
- Measure before and after. Count lines of code, startup time, dependency size, and upgrade pain. If the new path is cleaner but not actually simpler, do not fool yourself.
When I worked on large systems at Amazon, we cared a lot about repeatability. Not because it was trendy. Because repeatability keeps people from making the same mistake 40 times. That is what a good JSON API should do: remove noise, preserve meaning, and stay out of the way.
If you need deeper Java guidance while waiting for JDK 28 features, the Java documentation is still the plainest source for the platform. And if your team is modernizing code, pairing this with strong Java fundamentals is wise.
JEP 540 vs. Popular JSON Libraries
Here is the simple truth. Built-in does not mean best for every job.
| Feature | JEP 540 Simple JSON API | Jackson / Gson |
|---|
| Dependency load | Low, because it ships with the platform | External library required |
| Ease for small tasks | Very good | Good, but often overkill |
| Advanced features | Likely limited by design | Strong support for custom mapping, annotations, modules |
| Standardization | High, if it lands in JDK 28 | Depends on library choice |
| Best fit | Small and common JSON tasks | Complex serialization and large enterprise apps |
Jackson is the big competitor here, and for good reason. It is mature, flexible, and battle-tested. Gson is lighter in some cases, and many teams like its simple style. But both still ask you to bring in extra baggage. That is fine when you need the baggage. It is silly when you do not.
I have seen teams choose a library because it was “popular,” then spend months wrestling with annotation rules and edge cases they never needed in the first place. Popular is not the same as proper. The right tool depends on the size of the problem. For a simple config file or a small REST payload, a standard API may be enough.
That said, serious enterprise systems often need more than a simple API. Polymorphic types, custom naming rules, streaming, validation, and schema handling can push you back to a richer tool. The smart move is not loyalty. It is fit.
If you want a clear guide to Java release planning and feature delivery, the OpenJDK project home is the place to watch. For library comparisons, the official docs for Jackson and Gson help explain their scope.
Common Mistakes to Avoid
People make this harder than it needs to be.
- Assuming it replaces every library: No, a simple API is not a cure-all. If your app needs advanced mapping, keep your existing tool.
- Ignoring real data shape: Clean demo JSON is not the same as ugly production JSON. The difference bites hard.
- Skipping tests: New APIs still need tests, because machines do not care about your confidence.
- Chasing novelty: Moving to a new API just because it is new is childish. Use it where it helps.
- Forgetting team habits: A simple API only helps if your team agrees on how to use it.
Most advice online makes new platform features sound like instant salvation. That is nonsense. I have lived through enough platform shifts to know that the hard part is not the API. It is the habits around the API. People copy patterns, make shortcuts, and then act shocked when the shortcuts become a pile of debt.
The better move is to start small. Use the new JSON API for plain cases first. Leave the hard stuff alone until the tool proves itself. That is common sense, which sadly is not common enough.
If you want to keep your Java code base clean, reading about Java JSON handling patterns can help frame the tradeoffs. Use the new feature as a tool, not a religion.
Frequently Asked Questions
Will JEP 540 replace Jackson?
No. It is aimed at simple JSON use cases, not every advanced enterprise need. Jackson will still matter for complex mapping and custom behavior.
Why does Java need a built-in JSON API?
Because many common JSON tasks are small, and using a full external library for each one adds weight, setup work, and long-term upkeep.
Should teams wait for JDK 28 before using JSON in Java?
No. If you need richer features now, keep using a proven library. JEP 540 is for teams that want a simpler built-in option when it becomes available.
Is a simple API safer than a big library?
Not automatically. Safety depends on correct use, good tests, and sensible input handling. Smaller does not mean perfect.
Final Thought
I like this proposal because it respects time. That is rare. In big systems, small boring things often carry the real load, and good tools should honor that work instead of inflating it. If JEP 540 lands well in JDK 28, it may save teams from a lot of needless clutter. I count that as sound stewardship, plain and simple. — Ermenildo V Castro