Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
f2431095
Commit
f2431095
authored
Dec 22, 2015
by
Nalinichandra Penke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #2775: Add option to flatc to skip unknown fields in JSON
parent
13d0594b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
flatc.cpp
src/flatc.cpp
+5
-0
No files found.
src/flatc.cpp
View file @
f2431095
...
...
@@ -100,6 +100,9 @@ static void Error(const std::string &err, bool usage, bool show_exe_name) {
" no trailing commas in tables/vectors.
\n
"
" --defaults-json Output fields whose value is the default when
\n
"
" writing JSON
\n
"
" --unknown-json Allow fields in JSON that are not defined in the
\n
"
" schema. These fields will be discared when generating
\n
"
" binaries.
\n
"
" --no-prefix Don
\'
t prefix enum values with the enum type in C++.
\n
"
" --scoped-enums Use C++11 style scoped and strongly typed enums.
\n
"
" also implies --no-prefix.
\n
"
...
...
@@ -155,6 +158,8 @@ int main(int argc, const char *argv[]) {
opts
.
skip_js_exports
=
true
;
}
else
if
(
arg
==
"--defaults-json"
)
{
opts
.
output_default_scalars_in_json
=
true
;
}
else
if
(
arg
==
"--unknown-json"
)
{
opts
.
skip_unexpected_fields_in_json
=
true
;
}
else
if
(
arg
==
"--no-prefix"
)
{
opts
.
prefixed_enums
=
false
;
}
else
if
(
arg
==
"--scoped-enums"
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment