From 2fb4cefaba7273ac6d58861296b3bd7f0061f130 Mon Sep 17 00:00:00 2001 From: Aleksandr Smolin Date: Sat, 9 Sep 2023 10:01:06 +0300 Subject: [PATCH] Add argument to FlatBufferToString for quotes around field names, default false --- 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 1e04bfff02a..09ff66c334a 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;