“Python Print hübsch JSON” Code-Antworten

Python Print hübsch JSON


import json

json_data = '[{"ID":10,"Name":"Pankaj","Role":"CEO"},' \
            '{"ID":20,"Name":"David Lee","Role":"Editor"}]'

json_object = json.loads(json_data)

json_formatted_str = json.dumps(json_object, indent=2)

print(json_formatted_str)
Wide-eyed Wren

Pretty Json Python

print(json.dumps(dict, indent=4))
Yucky Yacare

Ähnliche Antworten wie “Python Print hübsch JSON”

Fragen ähnlich wie “Python Print hübsch JSON”

Weitere verwandte Antworten zu “Python Print hübsch JSON” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen