Added --defaults-json to output fields at default value.
authorWouter van Oortmerssen <wvo@google.com>
Wed, 27 May 2015 23:42:15 +0000 (16:42 -0700)
committerWouter van Oortmerssen <wvo@google.com>
Wed, 27 May 2015 23:42:15 +0000 (16:42 -0700)
commitecf5a6a580980af8f6ef83b513011f35dddc0c2b
tree206c85dbceaca91ba3df7d308532288ee4d38e12
parent788acb08d491d8436a77efb113c3533d17a5bac2
Added --defaults-json to output fields at default value.

Normal behavior is to not output fields that happen to have
the default value, since those will be reproduced anyway
when turned into a FlatBuffer binary. This however can be problematic
when using JSON to interop with other system since they might not
know this default value. This flatc option (and also flag
to GenerateText) will force those fields to be output anyway.

Tested: on Linux.
docs/source/Compiler.md
include/flatbuffers/idl.h
src/flatc.cpp
src/idl_gen_text.cpp