3 ms·
JSON is also missing an integer type. Read the spec. Basically all it says is that the numeric type is a float, but doesn't say anything about its precision.
by lokedhs 7y ago
JSON is also missing an integer type.
Read the spec. Basically all it says is that the numeric type is a float, but doesn't say anything about its precision.
I'm amazed that there haven't been any security vulnerabilities found yet that takes advantage of different number formats in different JSON implementations.
You'd think that a data serialisation format should get at least numbers right. All the ones that came before (and after) did, yet we're still stuck with JSON.
- hombre_fatal 7y agoIs that like saying it doesn't have a username type? How could you ever know this bit of data is a username if it doesn't have a username type?
- lokedhs 7y agoI think there is a rather large difference between not having a username type vs. not having an integer type. As it turns out, the only way you can reliably store an integer in JSON is to use a string field. This is incidentally also the correct way to store a username in JSON.