Allow structs to be parsed in JSON with out of order fields.

Also simplified the code and made it faster.

Change-Id: I1d83b1165a4a9a4380d1bfb5538769c012d2d367
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2015-09-28 15:02:41 -07:00
parent 2107a7d514
commit 4d7810424c
10 changed files with 46 additions and 47 deletions

View File

@@ -167,6 +167,7 @@ inline flatbuffers::Offset<Stat> CreateStat(flatbuffers::FlatBufferBuilder &_fbb
return builder_.Finish();
}
/// an example documentation comment: monster object
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
const Vec3 *pos() const { return GetStruct<const Vec3 *>(4); }
Vec3 *mutable_pos() { return GetStruct<Vec3 *>(4); }