Towards a JSON API for the JDK

Markus KARG markus at headcrashing.eu
Mon May 19 21:02:18 UTC 2025


Paul,

thank you for picking up the topic JSON. I do like the simplicity of 
your proposal, OTOH I have concerns:

* Will it it be sustaining?

We added a XML API when XML was "the" big thing, and now it is not a big 
thing anymore and we can't get rid of the XML API without breaking 
things. So does it really make sense to add a JSON API to OpenJDK? I see 
the risk that in 10 years we are in the same situation as with XML: It 
got replaced with "the" next big thing, and then it lingers in the JDK 
together with the XML API. Maybe it would be better to have some 
"beginner's bundle" with all those goodies that newcomers need, instead 
of making all of that part of the JRE?

* Will it be too late?

As JSON is such a big thing for many years, there are lots of 
implementations, and several abstracting APIs already, most prominently 
Jakarta JSON-P (formerly Java EE JSON-P; 
https://jakartaee.github.io/jsonp-api/). Does it make really make much 
sense to provide a competitive abstraction API?

* Will it be too verbose?

I doubt that the not really short-to-read code samples really attract 
beginners. And all others simply go with existing solutions, as they 
have no benefit from abondoning existing solutions.

-Markus



More information about the core-libs-dev mailing list