I know you can configure Express to output either pretty JSON (app.set("json spaces", 2)) or minified JSON (app.set("json spaces", 0)), but is there a way to override this global setting on a particular response?
For example, if I set json spaces to 0, I could pretty print doing something like:
app.get("/foo", function(req,res) {
res.json({"a":"b"}, 2);
});
Thanks!