Re:Show HN: Weird JSON superset with BigInt, Infinity, Typed...
by ellis0n on Thursday November 26, 2020 @05:45PM
(#25224088)
I completely agree. I use strings for json front / back communication as much as possible. A string (or hash) is a unique metric. I have a real-life example where I was working with a junior C # backend developer who was creating code with a lot of errors, and we doubled our progress when we stopped discussing json types. Another good lesson when the frontend code of the code thinks "with its own head" and checks each json input parameter for safety and fewer errors, and strings have less opportunity to check and validate if (!!s) and clean i=parseInt(res.i), parseBool(..), parseObjA(..) looks like typed programming and newcomers to projects can learn the code better.
[ Parent
| on HN ]
There are no comments on this comment yet.