diff options
Diffstat (limited to 'src/idl_gen_text.cpp')
-rw-r--r-- | src/idl_gen_text.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/idl_gen_text.cpp b/src/idl_gen_text.cpp index e4d21824..903c41ec 100644 --- a/src/idl_gen_text.cpp +++ b/src/idl_gen_text.cpp @@ -292,7 +292,7 @@ struct JsonPrinter { it != struct_def.fields.vec.end(); ++it) { FieldDef &fd = **it; auto is_present = struct_def.fixed || table->CheckField(fd.value.offset); - auto output_anyway = opts.output_default_scalars_in_json && + auto output_anyway = (opts.output_default_scalars_in_json || fd.key) && IsScalar(fd.value.type.base_type) && !fd.deprecated; if (is_present || output_anyway) { if (fieldout++) { AddComma(); } |