Values that survive a round trip through storage unchanged.
JSON alone turns NaN into null, drops undefined, flattens a Date to a string and a Map to {}. The codec tags those values instead, so what you read back has the same type as what you wrote.
NaN
null
undefined
Date
Map
{}
Values that survive a round trip through storage unchanged.
JSON alone turns
NaNintonull, dropsundefined, flattens aDateto a string and aMapto{}. The codec tags those values instead, so what you read back has the same type as what you wrote.