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

Add documentation note about JSON.parse not being spec compliant #66120

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

RedMser
Copy link
Contributor

@RedMser RedMser commented Sep 19, 2022

Part of #66114
Fixes #40394

List all known differences between Godot's JSON parser and the specs, as taken from #66114.
The crashes are not listed here as they are fixed in #66117. Invalid escape sequences are fixed in #66170.

@RedMser RedMser requested a review from a team as a code owner September 19, 2022 16:38
@RedMser RedMser changed the title Add note about JSON.parse not being spec compliant Add documentation note about JSON.parse not being spec compliant Sep 19, 2022
@YeldhamDev YeldhamDev added this to the 4.0 milestone Sep 19, 2022
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Seems good, but I think it would be good enough to mention this once in the class description instead of repeating it in both parse methods.

@RedMser
Copy link
Contributor Author

RedMser commented Sep 20, 2022

Fair point, this makes it more convenient to list all spec-breaking differences as well.

I left out the invalid escape sequences from the docs, as I now opened #66170 to fix it instead. I also left out two very minor parsing differences (null byte at end, and form feed as whitespace) as I don't think they'll cause any problems in real-world applications.

@akien-mga akien-mga merged commit b809b6d into godotengine:master Sep 20, 2022
@akien-mga
Copy link
Member

Thanks!

@RedMser RedMser deleted the json-spec-docs branch June 3, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate_Json() and parse_json does not catch trailing commas
3 participants