Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
It's always a good idea to provide another languages datatypes and then hardcode your generic handlers to them. This helps you reach peak stringly-typed integrity. When you decide to change the server platform you don't just get to bill to update the work in one place, it becomes work for everybody.
And customers who might be on other platforms with no understanding of your platforms data types? Absolute plebs, if they can't see the inherent superiority in your frameworks language, no amount of effort will get them there.
This is an essential part of learning which clients are good enough for you. You are a princess, and damnit you deserve to be treated like one.
Soooo, why is there java in a json?!
Sounds like fucking heresy to me.
@Ranchu It's called polymorphic (de)serialization in jackson's terms (https://email@example.com...).
Basically json serializer leaves a hint in the json which JAVA object is that. And vice versa -- when deserializing json into POJOs jackson uses those hints to choose which class to wire those json fields into.
This is a hugging RCE as it allows users to construct any classes they want in remote APIs... I believe it even had a CVE assigned a while ago. I saw there was a fix -- blacklisting some classes.
Oh come on... They should teach this in security 101s: only use WHITELISTS!
@Ranchu prolly to mitigate some tech debt.
Knowing that project and the lead dev's attitude I'm almost certain that's the reason :)
After all my examples and explanation how to fix all their crap by adding a few levels of indirection and introducing a Composite pattern which would've solved most of their problems.... They do THAT.