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…”
Many API developers may choose not to use them, but they are absolutely there.
You specify the type by including or excluding quotation marks, and then for the types without quotation marks, you either include or exclude a decimal point to specify float or integer, and for boolean you use characters (specifically
true
orfalse
). Arrays are wrapped in[]
and objects are wrapped in{}
.JSON data as a whole is passed as one giant string because the REST protocol demands it. But once it’s been pulled in and properly interpreted, there are absolutely types in the data.
All of us fintech devs however, know the true horrors. Make everything a string, lest ye end up in precision hell
Just reminded me of an argument trying to explain that arithmetic with floating point numbers is not always correct to a coworker who was a mathematician just starting in software dev.
In a mathematicians mind the fact that an arithmetic operation can produce inaccurate result is just incomprehensible
Lovecraftian horror for mathematicians. Immediately goes insane.