Skip to content

Commit a37dd41

Browse files
committed
No need to pass sort_keys when dumping
1 parent 477e0e8 commit a37dd41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/fodo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def main():
5252
]
5353
)
5454
# Serialize to YAML
55-
yaml_data = yaml.dump(line.model_dump(), default_flow_style=False, sort_keys=False)
55+
yaml_data = yaml.dump(line.model_dump(), default_flow_style=False)
5656
print("Dumping YAML data...")
5757
print(f"{yaml_data}")
5858
# Write YAML data to file
@@ -67,7 +67,7 @@ def main():
6767
# Validate loaded data
6868
assert line == loaded_line
6969
# Serialize to JSON
70-
json_data = json.dumps(line.model_dump(), indent=2, sort_keys=False)
70+
json_data = json.dumps(line.model_dump(), indent=2)
7171
print("Dumping JSON data...")
7272
print(f"{json_data}")
7373
# Write JSON data to file

0 commit comments

Comments
 (0)