logoalt Hacker News

peterabbitcooklast Thursday at 11:36 PM1 replyview on HN

Where to stop is a pretty fuzzy question I suppose.

In my world, I think the worst possible outcome would be a java.util.json library that does 50-95% of what I currently do with GSON or Jackson. In that scenario I still need an external dependency, and I can either ignore java.util.json or turn a codebase into an error-prone mix of both.

Maybe a good set of design considerations for java.util.json would be “what does this API need to run a CRUD app written in modern java?” Parse requests from the web, send responses to the web, and serialize/deserialize data from X database (e.g. if noSQL or jsonb). In my head “in modern java” would mean that JSON is converted to records at application boundaries


Replies

pronyesterday at 2:03 AM

> Maybe a good set of design considerations for java.util.json would be “what does this API need to run a CRUD app written in modern java?”

Reading the JEP, that is not the motivation. The target is more a short script or some REPL interaction that reads JSON data from a web service and does something with it. A CRUD app likely already uses a web framework that comes with a full JSON library.