更新日期格式和 yaml 文件的输出格式

This commit is contained in:
YuCheng Hu 2021-03-12 16:08:15 -05:00
parent de77ec4a89
commit 5920259b86
No known key found for this signature in database
GPG Key ID: 1E5CBEF8B550FB7D
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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"
} }