Re:MessagePack: like JSON, but fast and small
by hombre_fatal on Wednesday March 11, 2020 @06:32AM
(#22544606)
Is 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?
Re:MessagePack: like JSON, but fast and small
by lokedhs on Thursday March 12, 2020 @11:36AM
(#22557921)
I 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.
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.