express-ping icon indicating copy to clipboard operation
express-ping copied to clipboard

Show pretty JSON

Open palmerabollo opened this issue 7 years ago • 3 comments

Add an option to send a prettified/readable json.

palmerabollo avatar Jan 20 '17 11:01 palmerabollo

Honestly, this should be the job of the client, e.g. a browser extension, or an independent /health that shows a dashboard.

elisaado avatar Feb 24 '21 20:02 elisaado

Hey, thanks for your feedback. Yes, this issue is low priority but it could improve the user experience in some scenarios (for example, if you use curl https://foo/health?pretty) and it's quite easy to implement. I'm not going to develop it myself, but I'm open to contributions if somebody finds it useful.

palmerabollo avatar Feb 24 '21 21:02 palmerabollo

I see. I think the following module can be used with just the normal json as input, then you can use the output in res.render.

https://www.npmjs.com/package/json-pretty-html

elisaado avatar Feb 24 '21 22:02 elisaado