userver: protobuf::json::ParseOptions Struct Reference
Loading...
Searching...
No Matches
protobuf::json::ParseOptions Struct Reference

#include </data/code/userver/libraries/protobuf/include/userver/protobuf/json/convert_options.hpp>

Detailed Description

Options which affect how JSON Value is converted to a protobuf message.

Definition at line 11 of file convert_options.hpp.

Public Attributes

bool ignore_unknown_fields = false
 Ignore unknown JSON fields and enum value names. If not set, conversion of a JSON object containing unknown field (i.e. field that is not mapped to any protobuf message field) or unknown enum value name will fail.
bool nonportable_raw_any = false
 Deserialize google.protobuf.Any from a raw {"type_url": "...", "value": "<base64>"} or {"typeUrl": "...", "value": "<base64>"} JSON object without looking up the payload descriptor in the descriptor pool. When set, value must be a base64-encoded protobuf wire-format string.

Member Data Documentation

◆ ignore_unknown_fields

bool protobuf::json::ParseOptions::ignore_unknown_fields = false

Ignore unknown JSON fields and enum value names. If not set, conversion of a JSON object containing unknown field (i.e. field that is not mapped to any protobuf message field) or unknown enum value name will fail.

Definition at line 15 of file convert_options.hpp.

◆ nonportable_raw_any

bool protobuf::json::ParseOptions::nonportable_raw_any = false

Deserialize google.protobuf.Any from a raw {"type_url": "...", "value": "<base64>"} or {"typeUrl": "...", "value": "<base64>"} JSON object without looking up the payload descriptor in the descriptor pool. When set, value must be a base64-encoded protobuf wire-format string.

Warning
This is a userver-only extension that is not supported in other frameworks. Only userver can correctly parse this format.

Definition at line 24 of file convert_options.hpp.


The documentation for this struct was generated from the following file: