Parser will allow a table or vector to have a trailing comma.

Unless in --strict-json mode.
Also added strict_json option to the parser, which in
addition controls if field names without quotes are allowed.

Change-Id: Id56fe5c780bdb9170958050ffa8fa23cf2babe95
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2015-01-16 16:57:04 -08:00
parent e568f17096
commit 6c2dc41e0d
6 changed files with 25 additions and 15 deletions

View File

@@ -41,8 +41,9 @@ be generated for each file processed:
fail (or none are specified) it will try to load relative to the path of
the schema file being parsed.
- `--strict-json` : Generate strict JSON (field names are enclosed in quotes).
By default, no quotes are generated.
- `--strict-json` : Require & generate strict JSON (field names are enclosed
in quotes, no trailing commas in tables/vectors). By default, no quotes are
required/generated, and trailing commas are allowed.
- `--no-prefix` : Don't prefix enum values in generated C++ by their enum
type.