From 11789e41b635fd3421d876add614cefa41aab594 Mon Sep 17 00:00:00 2001 From: Aleksandr Smolin <47792510+alresin@users.noreply.github.com> Date: Sun, 19 Nov 2023 00:29:41 +0300 Subject: [PATCH] Add argument to FlatBufferToString for quotes around field names, default false (#8090) Co-authored-by: Derek Bailey --- include/flatbuffers/minireflect.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/flatbuffers/minireflect.h b/include/flatbuffers/minireflect.h index 1e04bfff0..09ff66c33 100644 --- a/include/flatbuffers/minireflect.h +++ b/include/flatbuffers/minireflect.h @@ -408,8 +408,9 @@ inline std::string FlatBufferToString(const uint8_t *buffer, const TypeTable *type_table, bool multi_line = false, bool vector_delimited = true, - const std::string &indent = "") { - ToStringVisitor tostring_visitor(multi_line ? "\n" : " ", false, indent, + const std::string &indent = "", + bool quotes = false) { + ToStringVisitor tostring_visitor(multi_line ? "\n" : " ", quotes, indent, vector_delimited); IterateFlatBuffer(buffer, type_table, &tostring_visitor); return tostring_visitor.s;