node-envelope icon indicating copy to clipboard operation
node-envelope copied to clipboard

Implement un/serialization

Open jhermsmeier opened this issue 12 years ago • 3 comments

jhermsmeier avatar Aug 06 '13 01:08 jhermsmeier

JSON won't really work here, since we need to recreate buffers in a sane way. Other formats, like creationix/msgpack-js might work though.

jhermsmeier avatar Aug 07 '13 00:08 jhermsmeier

Couldn't serialization just work on Envelope objects (or Envelope-like objects, that is JSON + buffers)?

So that this would be an identify function: X => serialize(new Envelope(X)) (approximately). The consumer would be responsible for putting buffers in their JSON tree.

Personally I really like the structure of Envelope objects, it's easy and understandable, so if I could just serialize that object into an e-mail that'd mean a lot!

wiktor-k avatar Apr 25 '18 19:04 wiktor-k

Oh, I see my idea already has an issue: https://github.com/jhermsmeier/node-envelope/issues/10. Sorry for duplication :)

wiktor-k avatar Apr 25 '18 19:04 wiktor-k