express-objection-starter icon indicating copy to clipboard operation
express-objection-starter copied to clipboard

Use express hooks to custom serialize objects

Open JaneJeon opened this issue 5 years ago • 0 comments

Part of the reason why fastify is fast is that it relies on fast-json-stringify to stringify its outputs. And we already use jsonschema for everything, so integration with fast-json-stringify might be possible by hooking into res.send():

https://github.com/expressjs/express/blob/0a48e18056865364b2461b2ece7ccb2d1075d3c9/lib/response.js#L1118

Of course, this goes against #54 if we decide to go with this approach instead.

JaneJeon avatar Aug 21 '19 17:08 JaneJeon