Rails 4 "Pretty" JSON output -
i got new computer @ work , have been noticing things different work computer , home computer.
one perplexing me @ moment json output rails. @ home, puts out json automatically in way easy read. (with color, indentation etc)
instead, 1 lump block -_-;
[{"id":1,"title":"ratione fuga perferendis","is_completed":false,"created_at":"2015-06-19t16:48:27.947z","updated_at":"2015-06-19t16:48:27.947z"}]
anyone know how fix it?
that's browser being nice you. there lots of extensions chrome , firefox automatically format json you:
- chrome: json formatter
- chrome: json viewer
- firefox: jsonview
- firefox: jsonovich
- safari json formatter
you don't want rails handle pretty printing since dramatically increase size of json responses.
Comments
Post a Comment