ejson
ejson copied to clipboard
Serializing types without monkeypatching
The current addType
API, when applied to 3rd party classes, requires monkeypatching the 3rd party classes. It would be nice to devise an API for registering a full set of CustomType
callbacks that would apply on a type. The library could still monkeypatch as a matter of implementation, but perhaps using Symbol
s so it cannot conflict with existing symbols.