2 ms·
> You receive some JSON over the wire, it's not the right format, and everything blows up in your face. If I was using a staticly typed JSON parser, like say R
by shakna 7y ago
> You receive some JSON over the wire, it's not the right format, and everything blows up in your face.
If I was using a staticly typed JSON parser, like say Rust's or Crystal's, then it would blow up, right there. It'd throw an exception, or pass back a failure value that I have to handle.
JS doesn't do that. It just keeps going, and due to the way it implicitly handles types, getting a list instead of an object can mean you end up with a string later on.