The Wayback Machine - https://web.archive.org/web/20201107151207/https://github.com/expressjs/express/pull/3981
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provision to pass json replacer with a set of options. #3981

Open
wants to merge 2 commits into
base: master
from

Conversation

@prkeshri
Copy link

@prkeshri prkeshri commented Jun 13, 2019

app.set('json replacer', {
fn: function(key, value, {req, res}) { ...},
reqRes: true
});
This is another way.
One of the options is reqRes : true. In this case, the replacer function is called with req and res objects, which can be used to customise the replacement process according to the request.

app.set('json replacer', {
	fn: function(key, value, {req, res}) { ...},
	reqRes: true
});
This is another way.
One of the options is reqRes : true. In this case, the replacer function is called with req and res objects, which can be used to customise the replacement process according to the request.
@prkeshri prkeshri force-pushed the prkeshri:json-replacer branch from facb54c to f3ead23 Jun 14, 2019
@prkeshri
Copy link
Author

@prkeshri prkeshri commented Jun 14, 2019

Please consider now. Fixed

@dougwilson dougwilson added the pr label Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.