I generate a json, such as the following.
{"discs": [{
"label": "--",
"performer": "--",
"release": "--",
"title": "--",
"performances": [{
"movements": [{
"duration": 293,
"durationR": "4:53",
"...": ".."
}]
}]
}]
}
I want to format this json file as readable as the above, that is the simple properties are before more complicated content, but the real output is not controlled that.
My code is simple as
json.dump(data, outfile, indent=4, sort_keys=True)
Is there any methods to get that?