mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-05 21:17:25 +00:00
Added (nested) FlexBuffer JSON parsing and output.
FlexBuffer parser is just 40 lines of code (on top of existing parser!). Change-Id: Idebebadafb661ca5333f5621139031f6df3c3e1a Tested: on Linux.
This commit is contained in:
@@ -1343,7 +1343,7 @@ class CppGenerator : public BaseGenerator {
|
||||
code_ += " }";
|
||||
}
|
||||
|
||||
if (field.attributes.Lookup("flexbuffer")) {
|
||||
if (field.flexbuffer) {
|
||||
code_ += " flexbuffers::Reference {{FIELD_NAME}}_flexbuffer_root()"
|
||||
" const {";
|
||||
code_ += " auto v = {{FIELD_NAME}}();";
|
||||
|
||||
Reference in New Issue
Block a user