3 ms·
JSON is probably the fastest serialization format to produce and parse, which is also safe for public use, compared to binary formats which often have fragile,
by 3cats-in-a-coat 3y ago
JSON is probably the fastest serialization format to produce and parse, which is also safe for public use, compared to binary formats which often have fragile, highly specific and vulnerable encoding as they're directly plopped into memory and used as-is (i.e. they're not parsed at all, it's just two computers exchanging memory dumps).
Compare it with XML for example, which is a nightmare of complexity if you actually follow the spec and not just make something XML-like.
We have some formats which try to walk the boundary between safe/universal and fast like ASN.1 but those are obscure at best.
- alpaca128 3y agoI prefer msgpack if the data contains a lot of numeric values. Representing numbers as strings like in JSON can blow up the size and msgpack is usually just as simple to use.
- 3cats-in-a-coat 3y agoMsgpack is nice and simple sure.