Skip to main content

Module value_codec

Module value_codec 

Source
Expand description

Bounded conversion of the field-name JSON representation used by both gRPC peers.

These bounds also apply to values constructed in memory, independently of serde/prost parser recursion limits. All inputs are borrowed; rejected input remains owned by its caller.

Structs§

ValueLimitExceeded
A resource refusal, distinct from a value that does not match the schema.

Constants§

MAX_VALUE_BYTES
Retained-content accounting, including node/key overhead; not serialized wire size.
MAX_VALUE_DEPTH
Root depth is zero; every message field, map value, or list element adds one.
MAX_VALUE_NODES
VALUE_NODE_OVERHEAD_BYTES

Functions§

dynamic_message_to_json
Convert the complete message without relying on the protobuf decoder’s recursion cap.
json_to_dynamic_message
Convert one complete message, refusing invalid values rather than substituting defaults.
proto_value_to_json
Convert a reflected value with the same limits used for complete messages.