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

Method UnmarshalJSON

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

Source from the content-addressed store, hash-verified

45}
46
47func (x *FOO) UnmarshalJSON(data []byte) error {
48 value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO")
49 if err != nil {
50 return err
51 }
52 *x = FOO(value)
53 return nil
54}
55
56func (FOO) EnumDescriptor() ([]byte, []int) {
57 return fileDescriptor_e5b3e7ca68f98362, []int{0}

Callers

nothing calls this directly

Calls 2

UnmarshalJSONEnumFunction · 0.92
FOOTypeAlias · 0.85

Tested by

no test coverage detected