Is it possible to serialize / deserialize flatbuffers to and from JSON?
What I really want to do is to save flatbuffers as JSON, allow people to change whatever value they want, then read back JSON into a flatbuffer (and use that in some way in the application).
Maybe there is another way to achieve the same effect. We are working in C++.
Yes, this is built-in functionality in FlatBuffers. See "Text and Schema parsing" here: https://google.github.io/flatbuffers/flatbuffers_guide_use_cpp.html
Also see examples of that in test.cpp
in ParseAndGenerateTextTest()
, or also registry.h