diff --git a/serializing.html b/serializing.html index 10fb84f..edfc330 100644 --- a/serializing.html +++ b/serializing.html @@ -351,7 +351,7 @@ def protocol_version(file_object): >>> shell 1 >>> with open('basic-pretty.json', mode='w', encoding='utf-8') as f: -... json.dump(basic_entry, f, indent=2) ① +... json.dump(basic_entry, f, indent=2) ①
json.dump() function, it will make the resulting JSON file more readable, at the expense of larger file size. The indent parameter is an integer. 0 means “put each value on its own line.” A number greater than 0 means “put each value on its own line, and use this number of spaces to indent nested data structures.”