Adds a pretty printing function for JSON data.
Replaces print for print_json in corresponding cli objects.
Follows commit 828d6c0ce7
("list scopes: pretty print scope tree")
r.json() decodes the responses json and passes it to json.loads() which
will convert the content into a python dictionary.
Print the literal JSON text so that output can be further manipulated by
other tools like jq.