更新日期格式和 yaml 文件的输出格式
This commit is contained in:
parent
de77ec4a89
commit
5920259b86
|
@ -34,4 +34,4 @@ with open(json_filename) as json_file:
|
||||||
|
|
||||||
# Write to YAML
|
# Write to YAML
|
||||||
with open(yaml_filename, 'w') as yaml_file:
|
with open(yaml_filename, 'w') as yaml_file:
|
||||||
yaml.dump(data, yaml_file, allow_unicode=True)
|
yaml.dump(data, yaml_file, allow_unicode=True, default_flow_style=False)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"first_name": "John",
|
"first_name": "John",
|
||||||
"last_name": "Doe",
|
"last_name": "Doe",
|
||||||
"date_of_birth": "1/1/2021"
|
"date_of_birth": "1/1/1955"
|
||||||
}
|
}
|
Loading…
Reference in New Issue