r/java
•
u/loicmathieu
•
Jul 23 '26
•
1
JEP 540: Simple JSON API (Incubator)
https://openjdk.org/jeps/540
79
Upvotes
View all comments
2
u/davidalayachew Jul 24 '26
/u/s888marks
JsonObject.of(Map)andJsonArray.of(List)methods, why not copy the method signature ofMap.of(...)andList.of(...)and use that instead? Going through a list just to turn it right back into a JsonObject/Array seems like an unnecessary step if you don't already have a List/Map. Not a big deal though -- this is just a convenience method.That's all. Otherwise, this looks fantastic. I'm sure I will have some real feedback once I get my hands on this.