Closed nicbn closed 2 years ago
Implements a JSON encoder, and toJson. Also separates the implementation for each type, in order to more cleanly hide internal methods.
toJson
Keys for a map are stringified if they are not strings, so if a key is for example 1, it turns into "1".
Implements a JSON encoder, and
toJson
. Also separates the implementation for each type, in order to more cleanly hide internal methods.Keys for a map are stringified if they are not strings, so if a key is for example 1, it turns into "1".