koajs / json

pretty-printed JSON response middleware
MIT License
198 stars 9 forks source link

Why are we streaming JSON here, but using JSON.stringify in Koa itself? #13

Closed PlasmaPower closed 8 years ago

PlasmaPower commented 8 years ago

I think that the defaults should be the same for both of these. I get that this is an addon, but if one method is better, then why not use that one for both?

tj commented 8 years ago

I'm no help there, originally it was just middleware that allowed you to add ?pretty for formatted responses. Object streams are a hack, not really core material IMO

PlasmaPower commented 8 years ago

Oops nevermind, I misread the code. I thought it was streaming when JSON was passed to it. It's only streaming when a stream is passed to it.