-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Contradictory sentences in json docs #146061
Copy link
Copy link
Open
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
Projects
Status
No status
Status
Todo
Documentation
In the json docs, it is said that "the most compact representation" for json is used if
Noneis passed asindenttojson.dump(the default behaviour), under thejson.dump"Parameters" section.However, under the description for the
separatorsparameter, this is said: "If [separators is ]None (the default), separators defaults to (', ', ': ') if indent is None, and (',', ': ') otherwise. For the most compact JSON, specify (',', ':') to eliminate whitespace." The claim that the default behaviour gives "the most compact representation" is thus wrong;separators=(',', ':')is actually required as well.Section concerned (source):
I can open a PR if required.
Linked PRs