Pretty print all JSON responses from REST API
Bug #1664328 reported by
Jim Baker
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
craton |
Fix Released
|
High
|
git-harry |
Bug Description
For better demo/human usage of the REST API, and to follow fairly common practice, we should always pretty print the JSON responses. This adds negligible overhead: the JSON encoder in the json library has virtually no overhead for adding indentation; and gzip encoding would take care of this and other JSON encoding overhead issues in terms of resulting size.
This should be a few line fix, per http://
For the specific pretty printing, I suggest we use {"indent": 2, "sort_keys": True} (such sorting is also negligible in cost, especially given pagination).
description: | updated |
Changed in craton: | |
importance: | Undecided → High |
milestone: | none → v0.1.0 |
Changed in craton: | |
assignee: | nobody → git-harry (git-harry) |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/442588
Review: https:/