diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2017-03-10 15:03:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-10 15:03:29 -0800 |
commit | 92064a40ceb2ecdfed42f441b9c46c9c9fa00d34 (patch) | |
tree | dab81a41f649f177b32a6aea20215fb29cc4c3f9 /src/google/protobuf/util/internal/testdata/books.proto | |
parent | cd6eb9168431c96711e84906d7adc0b6852a67be (diff) | |
parent | 61e87f3d41554989883e2c2fe35fbb9d891879cd (diff) | |
download | protobuf-92064a40ceb2ecdfed42f441b9c46c9c9fa00d34.tar.gz protobuf-92064a40ceb2ecdfed42f441b9c46c9c9fa00d34.tar.bz2 protobuf-92064a40ceb2ecdfed42f441b9c46c9c9fa00d34.zip |
Merge pull request #2824 from xfxyjwf/i1415
Use per-type table to lookup JSON name.
Diffstat (limited to 'src/google/protobuf/util/internal/testdata/books.proto')
-rw-r--r-- | src/google/protobuf/util/internal/testdata/books.proto | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/google/protobuf/util/internal/testdata/books.proto b/src/google/protobuf/util/internal/testdata/books.proto index 9fe4f7aa..869271f4 100644 --- a/src/google/protobuf/util/internal/testdata/books.proto +++ b/src/google/protobuf/util/internal/testdata/books.proto @@ -190,3 +190,12 @@ message Cyclic { repeated Author m_author = 5; optional Cyclic m_cyclic = 4; } + +// Test that two messages can have different fields mapped to the same JSON +// name. See: https://github.com/google/protobuf/issues/1415 +message TestJsonName1 { + optional int32 one_value = 1 [json_name = "value"]; +} +message TestJsonName2 { + optional int32 another_value = 1 [json_name = "value"]; +} |