aboutsummaryrefslogtreecommitdiffhomepage
path: root/conformance
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2018-03-20 15:19:42 -0700
committerGravatar GitHub <noreply@github.com>2018-03-20 15:19:42 -0700
commit88a4884b55cf1a2a6576af0d558d2abe03ec6ba8 (patch)
tree4cc287cf181bf854e5dc77a8dd0d14077d62c18c /conformance
parentd6a17aadeb6fc306d3d8c3b5c07edc41f6bc551e (diff)
parent5140bae3834c40208e44b1eeb947485a832387a7 (diff)
Merge pull request #4345 from jskeet/list-json-null
Allow null value in JSON representation of ListValue
Diffstat (limited to 'conformance')
-rw-r--r--conformance/conformance_test.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/conformance/conformance_test.cc b/conformance/conformance_test.cc
index e4b046dc..d44c909a 100644
--- a/conformance/conformance_test.cc
+++ b/conformance/conformance_test.cc
@@ -2321,6 +2321,24 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner,
}
)");
RunValidJsonTest(
+ "ValueAcceptListWithNull", REQUIRED,
+ R"({"optionalValue": ["x", null, "y"]})",
+ R"(
+ optional_value: {
+ list_value: {
+ values: {
+ string_value: "x"
+ }
+ values: {
+ null_value: NULL_VALUE
+ }
+ values: {
+ string_value: "y"
+ }
+ }
+ }
+ )");
+ RunValidJsonTest(
"ValueAcceptObject", REQUIRED,
R"({"optionalValue": {"value": 1}})",
R"(