mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
typo
This commit is contained in:
@@ -40,10 +40,10 @@ if __name__ == '__main__':
|
||||
print(type(entry2['tags']))
|
||||
|
||||
with open('entry.json', 'w', encoding = 'utf-8') as f:
|
||||
json.dump(entry, f, default = custom_encoder)
|
||||
json.dump(entry, f, default = to_json)
|
||||
|
||||
with open('entry.json', 'r', encoding = 'utf-8') as f:
|
||||
entry2 = json.load(f, object_hook = custom_decoder)
|
||||
entry2 = json.load(f, object_hook = from_json)
|
||||
|
||||
print(entry == entry2)
|
||||
print(type(entry['tags']))
|
||||
|
||||
Reference in New Issue
Block a user