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

Expect fail when serialize inf and nan for Value.number_value in json format. fixes #11259 #11376

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Dec 20, 2022

Expect fail when serialize inf and nan for Value.number_value in json format. fixes #11259

Implemented in java, c++, python and upb. Also added conformance test.

https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value
where it says:
attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value).

@copybara-service copybara-service bot force-pushed the test_496741357 branch 2 times, most recently from 84b73aa to 26a941d Compare December 20, 2022 22:29
@copybara-service copybara-service bot force-pushed the test_496741357 branch 3 times, most recently from 51298a0 to 2bfedf9 Compare January 4, 2023 03:38
@copybara-service copybara-service bot changed the title Add conformance test. Expect fail when serialize inf and nan for Expect fail when serialize inf and nan for Jan 5, 2023
@copybara-service copybara-service bot changed the title Expect fail when serialize inf and nan for Expect fail when serialize inf and nan for Value.number_value in json format. fixes #11259 Jan 6, 2023
@copybara-service copybara-service bot closed this Jan 6, 2023
@copybara-service copybara-service bot deleted the test_496741357 branch January 6, 2023 11:47
@github-pages github-pages bot temporarily deployed to github-pages January 6, 2023 11:48 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python protobuf should refuse to serialize Infinity and NaN
0 participants