JSON parsing & text generation is now enum-identifier aware.
authorWouter van Oortmerssen <wvo@google.com>
Tue, 15 Jul 2014 00:49:04 +0000 (17:49 -0700)
committerWouter van Oortmerssen <wvo@google.com>
Tue, 15 Jul 2014 18:45:00 +0000 (11:45 -0700)
commit3fb6a86d020f7423553a4e2dbba637b56d7760f6
tree20b9aaa07fc1e5c89538eab1fb91e857b028f645
parent2811a3eac80397a1508a6a4da2342cbb722c0fa6
JSON parsing & text generation is now enum-identifier aware.

When Parsing JSON, it will read enums either as int values, identifiers
specific to the enum type, or strings containing those identifiers.

When generating text, it will output enum identifiers by default
(this can be turned off in favor of integers, like before).

Change-Id: If28b0a1f8f27de79aff3e626f40c0c0b271c325a
Tested: on Windows and Linux
Bug: 16214968
include/flatbuffers/idl.h
src/idl_gen_text.cpp
src/idl_parser.cpp
tests/monsterdata_test.golden
tests/monsterdata_test.json
tests/test.cpp