Douglas Wilson

Results 1985 comments of Douglas Wilson

@Fishrock123 I was just saying your suggestion is impossible to implemented in 3/4 is all, as it will break current (deprecated) uses of `res.json`. What is wrong with `res.type('json').send(JSON.stringify(data, replacer))`?

Plus I'm still waiting the hear what the use-case is for a per-request json replacer. The provided use-case from the last time this was requested was fundamentally flawed and made...

> Guys, I wasn't aware of the fact that we could use .get and .set on res as well, so I've changed that at least. You... can't. It was a...

> Uhm, why is it working then? Because `res.get('json replacer')` calls `res.getHeader('json replacer')` which is just returning `undefined`, since there is no `json replacer` header set. You never tried to...

Using your code right now, the following app: ``` js var express = require('./index') var app = express() app.set('json replacer', function (key, value) { if (key === 'id') return return...

Oh, sorry @rubenstolk I didn't realized you replied. You can just make a new comment rather than replying by completely replacing the content of an old comment, which is really...

Oh, and FYI, to me the use-case for adding this I guess sounds valid, though using express to do your DTO -> DTO transformations seems a little heavy-handed to me.

So, it's still open because we _need_ to address this (the issue about the replacer/spaces scope) in some way, but I'm not sure the current implementation in the PR would...

Ah, yes, indeed. I'm going to try and work to overhaul these private values such that each morgan instance gets it's own copy, which would make them independenct and recording...

> This makes the OP's example log ~2 seconds and I'd be happy to create a PR for this. Why, though? It would be a breaking change and the breaking...