Towards a JSON API for the JDK

Paul Sandoz paul.sandoz at oracle.com
Mon May 19 20:15:55 UTC 2025


The approach to the design of this API leans heavily on ongoing and future language and library features. This is why the API is so small as we don’t want conflicts with what we may do in the future. In the document we briefly mention data binding but don’t provide further context:

Advanced features, such as data
binding or path-based traversal should be possible to implement as layered
features, but for simplicity are not included in the core API

We think that Serialization 2.0 [1], a data-oriented approach to serialization, may provide the mechanism for binding between instances of JsonValue.

Paul.

[1] https://www.youtube.com/watch?v=fbqAyRJoQO0

On May 19, 2025, at 10:15 AM, Johannes Döbler <jd at civilian-framework.org> wrote:

Developers use JSON libraries like Fastjson, Jackson and Gson primarily (my claim) because they can marshal between JSON files and POJOs in one line of code with great performance and can easily tweak the mapping using annotations or adapter classes.
Being able to read/write a JSON file from/to a generic tree of JsonValues might have use-cases, but manually implementing data-binding based one tree traversal w/wo pattern matching will produce bloated and fragile code (my claim).
So my question is if there are plans to address data-binding in the future and how it would relate to the envisioned core API.
Thanks
Johannes


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250519/efcd0534/attachment-0001.htm>


More information about the core-libs-dev mailing list