Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultMarshalOptions protojson.MarshalOptions DefaultUnmarshalOptions protojson.UnmarshalOptions )
Options for marshal and unmarshal operations. A copy will be made before operation as the content of option will be modified (nil Resolver will be set) during operation.
View Source
var ErrNilMessageReference = errors.New("nil message reference")
ErrNilMessageReference indicate given message reference is nil.
Functions ¶
This section is empty.
Types ¶
type ProtobufJSON ¶ added in v0.0.2
ProtobufJSON wrap protocol buffers message make it able to marshal and unmarshal with encoding/json package.
func NewProtobufJSON ¶ added in v0.0.6
func NewProtobufJSON(msg proto.Message) ProtobufJSON
NewProtobufJSON wrap given protocol buffers message into ProtobufJSON.
func (*ProtobufJSON) MarshalJSON ¶ added in v0.0.2
func (m *ProtobufJSON) MarshalJSON() ([]byte, error)
func (*ProtobufJSON) UnmarshalJSON ¶ added in v0.0.2
func (m *ProtobufJSON) UnmarshalJSON(buf []byte) error
Click to show internal directories.
Click to hide internal directories.