Skip to content

Request to use Response.json over Response.send(JSON.stringify...) #23

@mastermatt

Description

@mastermatt

I'm curious if decision to use .send instead of .json was intentional for some reason:

response.send(JSON.stringify(problem))

The issue being, Expresses Response.json use app settings for the replacer, escape, and spaces settings of JSON.stringify and stringifying the payload directly bypasses these options.

If it doesn't make a difference to the functionality of this lib, I'd be happy to open a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions