View Source Protox.JsonMessageEncoder protocol (Protox v1.7.3)
This protocol makes possible to override the JSON encoding of a specific message.
For instance, it's possible to encode Google.Protobuf.Duration as a string rather than an object as required by the JSON encoding specification.
Summary
Functions
The contract of a message encoder.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
The contract of a message encoder.
msg
is the protobuf message to encodejson_encode
is the function to use in the protocol implementation to encode values to JSON