def dic_parse(dic):
if isinstance(dic, dict):
for key in dic:
value = dic.get(key)
if isinstance(value, dict):
dic_parse(dic_parse(value))
#下面几行注释,则打印出对应的key=value格
# for k in value.keys():
# if not isinstance(value[k], dict):
# print(key + "." + k + "=" + value[k])
else:
print(key+"="+dic[key])
dic_parse(str_json)
08-01
1322
10-08
1072
06-30
535
02-16
962