mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 05:47:36 +00:00
* Create a function GenerateGenerateTextFromTable in order to create a json from any Table Signed-off-by: Anthony Liot <anthony.liot@gmail.com> * Update the test to failed if loadfile or parser return false Signed-off-by: Anthony Liot <anthony.liot@gmail.com> * Fix snake_case name typo + space before &/* Signed-off-by: Anthony Liot <anthony.liot@gmail.com> * use auto Signed-off-by: Anthony Liot <anthony.liot@gmail.com> * Use clang-format on the added code Signed-off-by: Anthony Liot <anthony.liot@gmail.com>
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
2d67de3151
commit
249f3b3714
@@ -834,6 +834,10 @@ extern std::string MakeCamel(const std::string &in, bool first = true);
|
||||
// strict_json adds "quotes" around field names if true.
|
||||
// If the flatbuffer cannot be encoded in JSON (e.g., it contains non-UTF-8
|
||||
// byte arrays in String values), returns false.
|
||||
extern bool GenerateTextFromTable(const Parser &parser,
|
||||
const void *table,
|
||||
const std::string &tablename,
|
||||
std::string *text);
|
||||
extern bool GenerateText(const Parser &parser,
|
||||
const void *flatbuffer,
|
||||
std::string *text);
|
||||
|
||||
Reference in New Issue
Block a user