MCPcopy
hub / github.com/golang/protobuf / UnmarshalJSON

Method UnmarshalJSON

internal/testprotos/proto2_proto/test.pb.go:254–261  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

252}
253
254func (x *Defaults_Color) UnmarshalJSON(data []byte) error {
255 value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color")
256 if err != nil {
257 return err
258 }
259 *x = Defaults_Color(value)
260 return nil
261}
262
263func (Defaults_Color) EnumDescriptor() ([]byte, []int) {
264 return fileDescriptor_e5b3e7ca68f98362, []int{20, 0}

Callers

nothing calls this directly

Calls 2

UnmarshalJSONEnumFunction · 0.92
Defaults_ColorTypeAlias · 0.85

Tested by

no test coverage detected