3 ms·
I see more similitudes than differences in our thinkings :) One can make the problem easier in Java by using HashMaps instead of classes, just like one could m
by vemv 6y ago
I see more similitudes than differences in our thinkings :)
One can make the problem easier in Java by using HashMaps instead of classes, just like one could make it harder in JavaScript by emulating rigid OOP.
Which is to say, practically all languages have all the necessary technology for JSON not to be a pervasive problem. The only impediments are social/ideological.
(An idea which resonates with the original article's message)
- mrkeen 6y agoYou might expect your service to only receive a particular JSON format, but it could really receive any JSON, or any String, or any bytes, etc. At some point in the program you want to rely on your data already having been validated. HashMaps are not a good fit for this. For me the neatest way to address both of these is to have a very narrow conversion window. Transform the data from bytes/string/hashmaps into well-typed objects only within the controller.