mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-02 07:18:18 +00:00
Add argument to FlatBufferToString for quotes around field names, default false (#8090)
Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -408,8 +408,9 @@ inline std::string FlatBufferToString(const uint8_t *buffer,
|
|||||||
const TypeTable *type_table,
|
const TypeTable *type_table,
|
||||||
bool multi_line = false,
|
bool multi_line = false,
|
||||||
bool vector_delimited = true,
|
bool vector_delimited = true,
|
||||||
const std::string &indent = "") {
|
const std::string &indent = "",
|
||||||
ToStringVisitor tostring_visitor(multi_line ? "\n" : " ", false, indent,
|
bool quotes = false) {
|
||||||
|
ToStringVisitor tostring_visitor(multi_line ? "\n" : " ", quotes, indent,
|
||||||
vector_delimited);
|
vector_delimited);
|
||||||
IterateFlatBuffer(buffer, type_table, &tostring_visitor);
|
IterateFlatBuffer(buffer, type_table, &tostring_visitor);
|
||||||
return tostring_visitor.s;
|
return tostring_visitor.s;
|
||||||
|
|||||||
Reference in New Issue
Block a user