diff --git a/serializing.html b/serializing.html index 64f542f..2f6ec3a 100644 --- a/serializing.html +++ b/serializing.html @@ -474,7 +474,7 @@ def protocol_version(file_object): 1 >>> import customserializer >>> with open('entry.json', 'w', encoding='utf-8') as f: -... json.dump(entry, default=customserializer.to_json) +... json.dump(entry, f, default=customserializer.to_json) ... Traceback (most recent call last): File "<stdin>", line 9, in <module> @@ -521,7 +521,7 @@ def to_json(python_object): >>> shell 1 >>> with open('entry.json', 'w', encoding='utf-8') as f: -... json.dump(entry, default=customserializer.to_json) +... json.dump(entry, f, default=customserializer.to_json) ...