2 ms·
Bigints, dates, and buffers I can understand to a degree. Sets can easily be serialized as a json array. Maps can be serialized as a json array of arrays or as
by pitaj 5y ago
Bigints, dates, and buffers I can understand to a degree.
Sets can easily be serialized as a json array. Maps can be serialized as a json array of arrays or as a single json dictionary if the key types are compatible.
- kybernetikos 5y agoEverything can be serialised as something else with various degress of difficulty, but one of the beauties of JSON was that it had support for most of the native types of javascript. It's nice not to have to write special logic to serialise / deserialise the way you want. In particular, the ability to round trip all the standard types would be really useful.