mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user