Module proto_json

Module proto_json 

Source
Expand description

Proto JSON serialization support.

This module provides ProtoJsonSerializer and ProtoJsonDeserializer that wrap standard serde serializers/deserializers to apply proto JSON spec transformations:

  • Float NaN/Infinity as strings: "NaN", "Infinity", "-Infinity"
  • Bytes as base64-encoded strings

Well-known type handling (Timestamp, Duration, wrappers) remains in the base Serialize impl using is_human_readable().

Structsยง

ProtoJsonDeserializer
A serde Deserializer wrapper that handles proto JSON input quirks.
ProtoJsonSerializer
A serde Serializer wrapper that applies proto JSON transformations.