3 ms·
I hadn't considered the one-way nature of dumping Java classes to JSON. Mainly because I work with classes that are serialized both to and from JSON, rather th
by pwinnski 6y ago
I hadn't considered the one-way nature of dumping Java classes to JSON.
Mainly because I work with classes that are serialized both to and from JSON, rather than having Jackson annotations added much later.
I can see it now. Horrifying! I'm sorry for your troubles.
- mumblemumble 6y agoMy take-away is this: Protocols should always be defined independently of any existing code. The code-first approach only works well when you're doing something self-contained. Which, an API, almost by definition, is not.
- pwinnski 6y agoI generally try to design APIs from a consumer perspective, and then usually I end up with something RESTful. Let the server do whatever it has to do, you know?