Surely "1337" is the same as 1337, right?
Meme transcription:
Panel 1: Bilbo Baggins ponders, “After all… why should I care about the difference between int and String?
Panel 2: Bilbo Baggins is revealed to be an API developer. He continues, “JSON is always String, anyways…”
You are viewing a single comment
It's the API's job to validate it either way. As it does that job, it may as well parse the string as an integer.
I refuse to validate data that comes from the backend I specifically develop against.