Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-87506: Improve the documentation for json.load() and json.loads() #127355

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

srinivasreddy
Copy link
Contributor

@srinivasreddy srinivasreddy commented Nov 28, 2024

gh-87506: Improve the documentation for json.load() and json.loads()

@srinivasreddy
Copy link
Contributor Author

Since @serhiy-storchaka moved this into JSON issues, I am raising this PR.
If @rhettinger still feel that it is okay to forgo this documentation update since we cannot,(should not) comprehensively document every exception. And in that case we can successfully close the issue.

@skirpichev skirpichev changed the title gh-87505: Improve the documentation for json.load() and json.loads() gh-87506: Improve the documentation for json.load() and json.loads() Nov 28, 2024
If the data being deserialized is not a valid JSON document, a
:exc:`JSONDecodeError` will be raised.
If the data is not a valid JSON document, a :exc:`JSONDecodeError` will be
raised. If the binary file does not contain UTF-8, UTF-16 or UTF-32 encoded
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no file here. In any case the wording differs from the suggested by @rhettinger, so I leave this on him.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me.

@rhettinger rhettinger removed their request for review November 29, 2024 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants