Skip to content

Conversation

@hudlow
Copy link
Contributor

@hudlow hudlow commented Dec 11, 2025

No description provided.

@hudlow hudlow requested a review from timostamm December 11, 2025 18:54
nullAsZeroValue: boolean,
): number | typeof tokenNull | typeof tokenIgnoredUnknownEnum {
if (json === null) {
if (desc.typeName == "google.protobuf.NullValue") {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

desc.typeName == "google.protobuf.NullValue" was always true in calls where nullAsZeroValue was true.

Comment on lines -488 to -490
if (nullAsZeroValue) {
return scalarZeroValue(field.scalar, false);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All calls that passed nullAsZeroValue as true also guaranteed that json was not null.

@timostamm
Copy link
Member

Good catch. This means we can eliminate tokenNull, which I think is desirable: #1316

Base automatically changed from tstamm/Permit-google.protobuf.Value.null_value-in-map-values-in-ProtoJSON- to main December 12, 2025 15:39
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.

3 participants