import json |
def format_json(json_str: str ): |
dic = json.loads(json_str) |
js = json.dumps(dic, |
sort_keys = True , |
ensure_ascii = False , |
indent = 4 , |
separators = ( ', ' , ': ' )) |
return js |