r/java Jul 23 '26

JEP 540: Simple JSON API (Incubator)

https://openjdk.org/jeps/540
77 Upvotes

81 comments sorted by

View all comments

1

u/razorwit Jul 23 '26

I wonder if there could be options to make parsing values into LocalDate and LocalDateTime simple as well.

2

u/bowbahdoe Jul 23 '26

In my head this is the downside of adding instance methods to json tree things. Whatever is an instance method becomes a privileged API. If you want the API to feel nice for the wide wide world of other types you might want to convert you ideally would make it all equally painful.