Commit 8b39a84
committed
encoding/protojson: fix google.protobuf.Empty serialization
Go Protobuf was diverging from other Protobuf implementations.
Worse: The other Protobuf implementations cannot decode
what Go Protobuf encodes for a google.protobuf.Empty message.
By now, the spec has been updated to explicitly spell out
that google.protobuf.Empty is not considered special and
should result in {"@type": "type.googleapis.com/google.protobuf.Empty"}
without an extra `"value": {}`.
The fixed encoding is decoded correctly with Go Protobuf
v1.35.2 (released November 2024) or newer.
Fixes golang/protobuf#1707
Fixes golang/protobuf#1620
For protocolbuffers/protobuf#5390
For protocolbuffers/protobuf#17099
For protocolbuffers/protobuf#24445
Change-Id: I54f4d842e7272743191ec274b8e7434ddb74203f
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/735120
Reviewed-by: Lasse Folger <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Cassondra Foesch <[email protected]>1 parent 20262ed commit 8b39a84
2 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1717 | 1717 | | |
1718 | 1718 | | |
1719 | 1719 | | |
1720 | | - | |
1721 | | - | |
| 1720 | + | |
1722 | 1721 | | |
1723 | 1722 | | |
1724 | 1723 | | |
| |||
1927 | 1926 | | |
1928 | 1927 | | |
1929 | 1928 | | |
1930 | | - | |
1931 | | - | |
| 1929 | + | |
1932 | 1930 | | |
1933 | 1931 | | |
1934 | 1932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
0 commit comments