Data binding is a complex feature, even if some examples make it appear simple. Our intention is to explore alignment with the serialization 2.0 effort, when we are ready to so. Hence, I would urge folks to be patience and watch out Brian and Viktor’s Devoxx 2024 talk on the topic.
Paul. > On May 20, 2025, at 12:21 PM, Swaranga Sarma <sarma.swara...@gmail.com> wrote: > > > A potential advantage that we (the OpenJDK community) can more easily do is > > devise an API that resonates with direction the Java platform is heading, > > specifically around the pattern matching and serialization 2.0 > > Right, but most of the discussion here seems to be on the low level tree API > and how one might navigate it (perhaps using pattern matching). I am not > seeing any discussion on the serialization/deserialization or any reasoning > why that is not the goal of the new JEP. Basically a very focused and narrow > API: > > ``` > var jsonStr = "..." > var myRecord = Json.deserialize(jsonString, UserRecord.class); //and a few > other variants > var serialized = Json.serialize(myRecord) > ``` > > This leaves the tree API open to reimplementation later when pattern matching > and other features are firmly in place in the JDK. I am making a case that > this would be more immediately useful for the most common and simpler cases. > > > Regards > Swaranga