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

[Feature] Pretty-print JSON output #168

Closed
spidgorny opened this issue Jan 13, 2021 · 1 comment
Closed

[Feature] Pretty-print JSON output #168

spidgorny opened this issue Jan 13, 2021 · 1 comment

Comments

@spidgorny
Copy link

How can I make the JSON output to be pretty-printed (line breaks and indents)?

Function sendBody() in http-utils.ts does JSON.stringify(body). Any way to make it configurable?

I think I can set the res.body in ALL my controllers to pre-formatted JSON string, but this can be too much changes for a trivial problem.

Is there a output middleware? I've only seen middleware that processes input in some way.

@spidgorny
Copy link
Author

Duplicate of #169 . Please close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant