typeson
typeson copied to clipboard
Preserves types over JSON, BSON or socket.io
Hi, Encapsulation doesn't work when the object has properties that throw errors. These properties should be ignored. To reproduce, open this HTML file in browser. ```HTML import { Typeson }...
When trying to revive custom objects that have as properties other custom objects, if the reviver functions are asynchronous, the outer object's reviver doesn't receive the nested revived value as...
The following minimal test case (in typescript) reveals a potential bug where a reference is undefined after revive through user defined conversion: ```typescript const Typeson = require('typeson'); class ComplexClassThroughArray {...
Symbol-typed keys (and their values) are also something which [gets lost in a JSON round-trip](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#Description). So it would be nice if typeson.js also supports key-rivival (next to value-revival). This would...
This may be a bug or it may be a doc issue. I'm not exactly sure because the documentation for the revive function does not explain its behavior but just...
Per our discussion in https://github.com/dfahlander/typeson-registry/issues/2 (I'm planning to reply there shortly, btw), the idea of stream support was added and for the API, the methods are to be postfixed with...
Issue #6 got me thinking about something else interesting--maybe we could have a Typeson option to check all objects for a "typeson" global symbol-keyed object (containing "replace" and "revive" methods)...