sitegui / js-binary

Encode/decode to a custom binary format, much more compact and faster than JSON/BSON
MIT License
91 stars 23 forks source link

Use reviver and replacer in json type #1

Open sitegui opened 9 years ago

sitegui commented 9 years ago

Somehow tell the lib a replacer function to JSON.stringify and a reviver for JSON.parse

This would help with https://github.com/clubedaentrega/log-sink/issues/3

Note that message property is non-enumerable. Related discussion at http://stackoverflow.com/questions/18391212/is-it-not-possible-to-stringify-an-error-using-json-stringify