mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-15 08:48:52 +00:00
Parser now allows empty tables in JSON
Bug: 16870719 Change-Id: Ia5fdce49a67b1aa621ab1e37a815e2a3293257b6 Tested: on Linux
This commit is contained in:
@@ -191,7 +191,6 @@ static void GenStruct(const StructDef &struct_def, const Table *table,
|
||||
std::string *_text) {
|
||||
std::string &text = *_text;
|
||||
text += "{";
|
||||
text += NewLine(opts.indent_step);
|
||||
int fieldout = 0;
|
||||
StructDef *union_sd = nullptr;
|
||||
for (auto it = struct_def.fields.vec.begin();
|
||||
@@ -202,8 +201,8 @@ static void GenStruct(const StructDef &struct_def, const Table *table,
|
||||
// The field is present.
|
||||
if (fieldout++) {
|
||||
text += ",";
|
||||
text += NewLine(opts.indent_step);
|
||||
}
|
||||
text += NewLine(opts.indent_step);
|
||||
text.append(indent + opts.indent_step, ' ');
|
||||
OutputIdentifier(fd.name, opts, _text);
|
||||
text += ": ";
|
||||
|
||||
Reference in New Issue
Block a user