added URL query parameter of "pretty=true" to output formatted json 

I'd change this to check if its `!= ""` 

This way doing ?pretty=1 will work as well.