More PEP8 Blank Lines compliance.
Use pretty json output when json dump is enabled.
json.dumps sort_keys to False
Use JSON pretty printing if JSON output selected.