Esc

Json_Options

structextensionsince 0.36.1Source
  • macOS: Json_Options works on macOS
  • Linux: Json_Options works on Linux
  • Windows: Json_Options works on Windows
  • Wasm: Json_Options works on Wasm

Declaration

Json_Options :: struct {
// Print implicit-presence fields that hold their default, and empty repeated fields and maps.    emit_defaults := false;// Keys are the .proto field names instead of the lowerCamelCase JSON names.    proto_names := false;// Enums print as numbers instead of names.    enum_numbers := false;// Indent with two spaces.    pretty := false;// Skip unknown keys, and drop a field, element or map entry holding an unknown enum name.    ignore_unknown_fields := false;// Nesting of JSON objects and arrays.    max_depth: s64 = 100;// The types a google.protobuf.Any may hold: a schema module's proto_registry, or several
joined into one array.    registry: [] Json_Type;}

How to_json writes and from_json reads.

See also