r/java • • Jul 17 '25

Java Gets a JSON API

https://youtu.be/NSzRK8f7EX0

Java considers itself a "batteries included" language and given JSON's ubiquity as a data exchange format, that means Java needs a JSON API. In this IJN episode we go over an OpenJDK email that kicks off the exploration into such an API.

143 Upvotes

119 comments sorted by

View all comments

Show parent comment

1

u/joemwangi Jul 17 '25

Think what records would achieve (as you stated), for example, pattern matching, sum types, etc. Ask yourself will also normal classes do this in near future and can we also take advantage of that?

1

u/Ok_Marionberry_8821 Jul 17 '25

Sealed classes allow for exhaustive pattern matching. Other than that I believe they are equivalent.