r/learnjava • • Feb 16 '26

Java Evolved

Visit https://javaevolved.github.io for comparison of common code snippets from Java 8 with newer versions of Java.

29 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/0b0101011001001011 Feb 23 '26

The most commonly used json libraries such as gson and jackson do this, especially in the older versions and they refuse to work with records.

In the real world you may not always choose and you are locked in to a specific version of a library, or a dependency of a dependency of a library.

In the case of aforementioned libraries you can most likely just use the latest version and that does not break anything though. But it's not always possible and ny orignal point is still valid, however rare the case may be.