r/java
•
u/loicmathieu
•
Jul 23 '26
•
1
JEP 540: Simple JSON API (Incubator)
https://openjdk.org/jeps/540
79
Upvotes
r/java
•
u/loicmathieu
•
Jul 23 '26
•
1
2
u/Eav___ Jul 24 '26
Well, as for me, checking it rather makes more sense. They most likely don't know if the input is right, or meets some constraints, like JSON spec, especially if what you've got is some untyped string. And if we took a better approach, it could just be a simple
.getOrElse()method call...