pgriess/node-msgpack — pull request #50 by mikepb (2013-08-19 23:19:16+00:00)
Title: [#19, #21] Implement toJSON compatibility

This pull request implements `toJSON` compatibility with `JSON.stringify()`.

To avoid crossing the V8 / C++ barrier and maximize performance, ensure that the `toJSON` method on the root object passed to `msgpack.pack` does not require further calls to `toJSON` in nested objects. The root `toJSON` call is done in JavaScript and is more performant than recursive `toJSON` calls.