mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-03 10:47:28 +00:00
Added a "strict JSON" mode to the text generator and compiler
This will add quotes around field names, as required by the official standard. By default it will leave quotes out, as it is more readable, more compact, and is accepted by almost all JSON parsers. The -S switch to flatc turns on strict mode. As per rfc 7159. Change-Id: Ibabe9c8162c47339d00ec581d18721a2ba40c6d0 Tested: on Windows.
This commit is contained in:
parent
9140144d51
commit
7fcbe723fc
11 changed files with 94 additions and 50 deletions
|
|
@ -380,7 +380,8 @@ static bool SaveClass(const Parser &parser, const Definition &def,
|
|||
|
||||
bool GenerateJava(const Parser &parser,
|
||||
const std::string &path,
|
||||
const std::string & /*file_name*/) {
|
||||
const std::string & /*file_name*/,
|
||||
const GeneratorOptions & /*opts*/) {
|
||||
using namespace java;
|
||||
|
||||
for (auto it = parser.enums_.vec.begin();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue