• Home
  • Raw
  • Download

Lines Matching +full:json +full:- +full:schema

1 Using the schema compiler    {#flatbuffers_guide_using_schema_compiler}
6 flatc [ GENERATOR OPTIONS ] [ -o PATH ] [ -I PATH ] FILES...
7 [ -- FILES...]
11 the most recent schema specified.
13 `--` indicates that the following files are binary files in
14 FlatBuffer format conforming to the schema indicated before it.
19 For any schema input files, one or more generators can be specified:
21 - `--cpp`, `-c` : Generate a C++ header for all definitions in this file (as
24 - `--java`, `-j` : Generate Java code.
26 - `--kotlin` , `--kotlin-kmp` : Generate Kotlin code.
28 - `--csharp`, `-n` : Generate C# code.
30 - `--go`, `-g` : Generate Go code.
32 - `--python`, `-p` : Generate Python code.
34 - `--js`, `-s` : Generate JavaScript code.
36 - `--ts`, `-T` : Generate TypeScript code.
38 - `--php` : Generate PHP code.
40 - `--grpc` : Generate RPC stub code for GRPC.
42 - `--dart`, `-d` : Generate Dart code.
44 - `--lua`, `-l` : Generate Lua code.
46 - `--lobster` : Generate Lobster code.
48 - `--rust`, `-r` : Generate Rust code.
50 - `--swift` : Generate Swift code.
52 - `--nim` : Generate Nim code.
58 - `--binary`, `-b` : If data is contained in this file, generate a
60 if one is specified in the schema).
62 - `--json`, `-t` : If data is contained in this file, generate a
63 `filename.json` representing the data in the flatbuffer.
65 - `--jsonschema` : Generate Json schema
69 - `-o PATH` : Output all generated files to PATH (either absolute, or
74 - `-I PATH` : when encountering `include` statements, attempt to load the
77 the schema file being parsed.
79 - `-M` : Print make rules for generated files.
81 - `--strict-json` : Require & generate strict JSON (field names are enclosed
85 - `--allow-non-utf8` : Pass non-UTF-8 input through parser and emit nonstandard
86 \x escapes in JSON. (Default is to raise parse error on non-UTF-8 input.)
88 - `--natural-utf8` : Output strings with UTF-8 as human-readable strings.
89 By default, UTF-8 characters are printed as \uXXXX escapes."
91 - `--defaults-json` : Output fields whose value is equal to the default value
92 when writing JSON text.
94 - `--no-prefix` : Don't prefix enum values in generated C++ by their enum
97 - `--scoped-enums` : Use C++11 style scoped and strongly typed enums in
98 generated C++. This also implies `--no-prefix`.
100 - `--no-emit-min-max-enum-values` : Disable generation of MIN and MAX
103 - `--gen-includes` : (deprecated), this is the default behavior.
105 statements) use `--no-includes.`
107 - `--no-includes` : Don't generate include statements for included schemas the
110 - `--gen-mutable` : Generate additional non-const accessors for mutating
111 FlatBuffers in-place.
113 - `--gen-onefile` : Generate single output file for C#, Go, and Python.
115 - `--gen-name-strings` : Generate type name functions for C++.
117 - `--gen-object-api` : Generate an additional object-based API. This API is
122 - `--gen-compare` : Generate operator== for object-based API types.
124 - `--gen-nullable` : Add Clang \_Nullable for C++ pointer. or @Nullable for Java.
126 - `--gen-generated` : Add @Generated annotation for Java.
128 - `--gen-jvmstatic` : Add @JvmStatic annotation for Kotlin methods
131 - `--gen-all` : Generate not just code for the current schema files, but
136 - `--cpp-include` : Adds an #include in generated file
138 - `--cpp-ptr-type T` : Set object API pointer type (default std::unique_ptr)
140 - `--cpp-str-type T` : Set object API string type (default std::string)
143 --cpp-str-flex-ctor option to change this behavior).
145 - `--cpp-str-flex-ctor` : Don't construct custom string types by passing
147 construction of custom string types, including zero-copy construction.
149 - `--no-cpp-direct-copy` : Don't generate direct copy methods for C++
150 object-based API.
152 - `--cpp-std CPP_STD` : Generate a C++ code using features of selected C++ standard.
154 * `c++0x` - generate code compatible with old compilers (VS2010),
155 * `c++11` - use C++11 code generator (default),
156 * `c++17` - use C++17 features in generated code (experimental).
158 - `--object-prefix` : Customise class prefix for C++ object-based API.
160 - `--object-suffix` : Customise class suffix for C++ object-based API.
162 - `--go-namespace` : Generate the overrided namespace in Golang.
164 - `--go-import` : Generate the overrided import for flatbuffers in Golang.
167 - `--raw-binary` : Allow binaries without a file_indentifier to be read.
168 This may crash flatc given a mismatched schema.
170 - `--size-prefixed` : Input binaries are size prefixed buffers.
172 - `--proto`: Expect input files to be .proto files (protocol buffers).
175 `import` (use `-I` for paths), `extend`, `oneof`, `group`.
179 - `--oneof-union` : Translate .proto oneofs to flatbuffer unions.
181 - `--grpc` : Generate GRPC interfaces for the specified languages.
183 - `--schema`: Serialize schemas instead of JSON (use with -b). This will
184 output a binary version of the specified schema that itself corresponds
185 to the reflection/reflection.fbs schema. Loading this binary file is the
188 - `--bfbs-comments`: Add doc comments to the binary schema files.
190 - `--conform FILE` : Specify a schema the following schemas should be
191 an evolution of. Gives errors if not. Useful to check if schema
192 modifications don't break schema evolution rules.
194 - `--conform-includes PATH` : Include path for the schema given with
195 `--conform PATH`.
197 - `--filename-suffix SUFFIX` : The suffix appended to the generated
200 - `--filename-ext EXTENSION` : The extension appended to the generated
201 file names. Default is language-specific (e.g. "h" for C++). This
204 - `--include-prefix PATH` : Prefix this path to any generated include
207 - `--keep-prefix` : Keep original prefix of schema include statement.
209 - `--reflect-types` : Add minimal type reflection to code generation.
211 - `--reflect-names` : Add minimal type/name reflection.
213 - `--root-type T` : Select or override the default root_type.
215 - `--require-explicit-ids` : When parsing schemas, require explicit ids (id: x).
217 - `--force-defaults` : Emit default values in binary output from JSON.
219 - `--force-empty` : When serializing from object API representation, force
222 - `--force-empty-vectors` : When serializing from object API representation, force
225 - `--flexbuffers` : Used with "binary" and "json" options, it generates
226 data using schema-less FlexBuffers.
228 - `--no-warnings` : Inhibit all warning messages.
230 - `--cs-global-alias` : Prepend `global::` to all user generated csharp classes and structs.
232 - `--json-nested-bytes` : Allow a nested_flatbuffer field to be parsed as a
233 vector of bytes in JSON, which is unsafe unless checked by a verifier
236 - `--python-no-type-prefix-suffix` : Skip emission of Python functions that are prefixed
239 - `--python-typing` : Generate Python type annotations
241 NOTE: short-form options for generators are deprecated, use the long form