aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/util/internal/testdata/books.proto
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2017-03-10 15:03:29 -0800
committerGitHub <noreply@github.com>2017-03-10 15:03:29 -0800
commit92064a40ceb2ecdfed42f441b9c46c9c9fa00d34 (patch)
treedab81a41f649f177b32a6aea20215fb29cc4c3f9 /src/google/protobuf/util/internal/testdata/books.proto
parentcd6eb9168431c96711e84906d7adc0b6852a67be (diff)
parent61e87f3d41554989883e2c2fe35fbb9d891879cd (diff)
downloadprotobuf-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.proto9
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"];
+}