mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-25 06:28:39 +00:00
flexbuffers blob to string implementation (#5039)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
f8a0d3889b
commit
9068b0ee63
@@ -547,6 +547,9 @@ class Reference {
|
|||||||
AppendToString<TypedVector>(s, AsTypedVector(), keys_quoted);
|
AppendToString<TypedVector>(s, AsTypedVector(), keys_quoted);
|
||||||
} else if (IsFixedTypedVector()) {
|
} else if (IsFixedTypedVector()) {
|
||||||
AppendToString<FixedTypedVector>(s, AsFixedTypedVector(), keys_quoted);
|
AppendToString<FixedTypedVector>(s, AsFixedTypedVector(), keys_quoted);
|
||||||
|
} else if (IsBlob()) {
|
||||||
|
auto blob = AsBlob();
|
||||||
|
flatbuffers::EscapeString(reinterpret_cast<const char*>(blob.data()), blob.size(), &s, true, false);
|
||||||
} else {
|
} else {
|
||||||
s += "(?)";
|
s += "(?)";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user