mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
Merge pull request #29435 from protocolbuffers/tonyliaoss-csharp-cherrypick-3
Some checks failed
Tests / Apply Safe for Tests Label (push) Failing after 0s
Tests / Validate YAML (push) Has been skipped
Tests / Bazel (push) Has been skipped
Tests / C++ (push) Has been skipped
Tests / Java (push) Has been skipped
Tests / Python (push) Has been skipped
Tests / Ruby (push) Has been skipped
Tests / PHP (push) Has been skipped
Tests / PHP Extension (push) Has been skipped
Tests / C# (push) Has been skipped
Tests / Objective-C (push) Has been skipped
Tests / Rust (push) Has been skipped
Tests / μpb (push) Has been skipped
Tests / hpb (push) Has been skipped
Tests / Remove safety tag (push) Failing after 0s
Tests / Staleness (push) Has been cancelled
Tests / All Blocking Tests (push) Has been cancelled
Some checks failed
Tests / Apply Safe for Tests Label (push) Failing after 0s
Tests / Validate YAML (push) Has been skipped
Tests / Bazel (push) Has been skipped
Tests / C++ (push) Has been skipped
Tests / Java (push) Has been skipped
Tests / Python (push) Has been skipped
Tests / Ruby (push) Has been skipped
Tests / PHP (push) Has been skipped
Tests / PHP Extension (push) Has been skipped
Tests / C# (push) Has been skipped
Tests / Objective-C (push) Has been skipped
Tests / Rust (push) Has been skipped
Tests / μpb (push) Has been skipped
Tests / hpb (push) Has been skipped
Tests / Remove safety tag (push) Failing after 0s
Tests / Staleness (push) Has been cancelled
Tests / All Blocking Tests (push) Has been cancelled
Allow later enum aliases to overwrite in C# custom JSON enum mapping.
This commit is contained in:
commit
9798e2b874
1 changed files with 1 additions and 2 deletions
|
|
@ -774,8 +774,7 @@ namespace Google.Protobuf
|
||||||
{
|
{
|
||||||
var jsonOptions = value.GetOptions()?.GetExtension(
|
var jsonOptions = value.GetOptions()?.GetExtension(
|
||||||
Pb.Enumvalue.JsonEnumvalueOptionsExtensions.Json);
|
Pb.Enumvalue.JsonEnumvalueOptionsExtensions.Json);
|
||||||
if (jsonOptions != null && jsonOptions.HasString &&
|
if (jsonOptions != null && jsonOptions.HasString)
|
||||||
!map.ContainsKey(jsonOptions.String))
|
|
||||||
{
|
{
|
||||||
map[jsonOptions.String] = value;
|
map[jsonOptions.String] = value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue