expressjs / expressjs/express

Deprecate res.send(obj) json overload

Open
#2,249 19 comments 3 reactions 0 assignees View on GitHub
6.x discuss
Dominant language
JavaScript
Stars
69.5k
Forks
25k
Avg merge
4d 20h
Merged PRs (30d)
9

Description

This is an idea for removing the `res.send(obj)` signature and it's other similar signatures that will `JSON.stringify` the value and send it as JSON. In my opinion there is no reason you cannot just type `res.json` instead. Deprecating and removing this overload will mean people do not have to make sure their variable to `res.send` is a string to get HTML output.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.