mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-04 12:43:24 +00:00
[cpp] Json parsing: adding support for parsing nested lists and top level lists (#4338)
* Extended json parsing capability: add support for parsing nested lists and top level lists * Stylistic conformance with surrounding code + generalized comments * More code tidy-up for stylistic conformance with surrounding code * Blank lines * Reverted changes related to top-level list parsing * Styling: newline before else * Taking out ProcessTableFields which is no longer needed as the top level list change was reverted.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
86b505e412
commit
b1740688bf
@@ -1106,6 +1106,13 @@ void ValueTest() {
|
||||
12335089644688340133ULL);
|
||||
}
|
||||
|
||||
void NestedListTest() {
|
||||
flatbuffers::Parser parser1;
|
||||
TEST_EQ(parser1.Parse("struct Test { a:short; b:byte; } table T { F:[Test]; }"
|
||||
"root_type T;"
|
||||
"{ F:[ [10,20], [30,40]] }"), true);
|
||||
}
|
||||
|
||||
void EnumStringsTest() {
|
||||
flatbuffers::Parser parser1;
|
||||
TEST_EQ(parser1.Parse("enum E:byte { A, B, C } table T { F:[E]; }"
|
||||
|
||||
Reference in New Issue
Block a user