r/java
•
u/loicmathieu
•
Jul 23 '26
•
1
JEP 540: Simple JSON API (Incubator)
https://openjdk.org/jeps/540
79
Upvotes
View all comments
Show parent comment
1
u/davidalayachew Aug 01 '26
Interesting. From what I could tell, it seemed like the thing was feature complete, missing only feedback from the community. Good to know, ty vm.
Ty vm. This is pretty much the only real pain point I have with this. It would just get in the way for no good reason imo.
I see what you mean now.
Yeah, this is something I have given some thought, but admittedly, is not a problem I run into very frequently.
Personally, none that are too irregular.
For the most part, my JSON needs and wants (that aren't production-scale) boil down to quickly querying an object. And like you said, it is good enough at that. It's the creation that's the pain point.
For me, creating POST bodies is about the most I would need it for. For example, when interacting with some exposed REST API for my favorite services (games, reddit, etc), I tend to shy away from the POST endpoints because constructing them is kind of ugly. For the most part, I basically have to create a giant String template, then just populate it with what I actually need.
Trying to instead do that via something less primitive, like a simple map-reduce with the Stream API feels daunting because, for the most part, creating the components that compose into the larger whole would probably be the same.
I guess I just need more experience doing this to really say. I can see better now why it was Incubator status.