Example #1
0
func (x *RPCType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(RPCType_value, data, "RPCType")
	if err != nil {
		return err
	}
	*x = RPCType(value)
	return nil
}
Example #2
0
func (x *Command_Type) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Command_Type_value, data, "Command_Type")
	if err != nil {
		return err
	}
	*x = Command_Type(value)
	return nil
}