kubernetes/vendor/google.golang.org/protobuf/encoding/protojson/decode.go

// Unmarshal reads the given []byte into the given [proto.Message].
// The provided message must be mutable (e.g., a non-nil pointer to a message).
func Unmarshal(b []byte, m proto.Message) error {}

type UnmarshalOptions

// Unmarshal reads the given []byte and populates the given [proto.Message]
// using options in the UnmarshalOptions object.
// It will clear the message first before setting the fields.
// If it returns an error, the given message may be partially set.
// The provided message must be mutable (e.g., a non-nil pointer to a message).
func (o UnmarshalOptions) Unmarshal(b []byte, m proto.Message) error {}

// unmarshal is a centralized function that all unmarshal operations go through.
// For profiling purposes, avoid changing the name of this function or
// introducing other code paths for unmarshal that do not go through this.
func (o UnmarshalOptions) unmarshal(b []byte, m proto.Message) error {}

type decoder

// newError returns an error object with position info.
func (d decoder) newError(pos int, f string, x ...any) error {}

// unexpectedTokenError returns a syntax error for the given unexpected token.
func (d decoder) unexpectedTokenError(tok json.Token) error {}

// syntaxError returns a syntax error for given position.
func (d decoder) syntaxError(pos int, f string, x ...any) error {}

// unmarshalMessage unmarshals a message into the given protoreflect.Message.
func (d decoder) unmarshalMessage(m protoreflect.Message, skipTypeURL bool) error {}

func isKnownValue(fd protoreflect.FieldDescriptor) bool {}

func isNullValue(fd protoreflect.FieldDescriptor) bool {}

// unmarshalSingular unmarshals to the non-repeated field specified
// by the given FieldDescriptor.
func (d decoder) unmarshalSingular(m protoreflect.Message, fd protoreflect.FieldDescriptor) error {}

// unmarshalScalar unmarshals to a scalar/enum protoreflect.Value specified by
// the given FieldDescriptor.
func (d decoder) unmarshalScalar(fd protoreflect.FieldDescriptor) (protoreflect.Value, error) {}

func unmarshalInt(tok json.Token, bitSize int) (protoreflect.Value, bool) {}

func getInt(tok json.Token, bitSize int) (protoreflect.Value, bool) {}

func unmarshalUint(tok json.Token, bitSize int) (protoreflect.Value, bool) {}

func getUint(tok json.Token, bitSize int) (protoreflect.Value, bool) {}

func unmarshalFloat(tok json.Token, bitSize int) (protoreflect.Value, bool) {}

func getFloat(tok json.Token, bitSize int) (protoreflect.Value, bool) {}

func unmarshalBytes(tok json.Token) (protoreflect.Value, bool) {}

func unmarshalEnum(tok json.Token, fd protoreflect.FieldDescriptor, discardUnknown bool) (protoreflect.Value, bool) {}

func (d decoder) unmarshalList(list protoreflect.List, fd protoreflect.FieldDescriptor) error {}

func (d decoder) unmarshalMap(mmap protoreflect.Map, fd protoreflect.FieldDescriptor) error {}

// unmarshalMapKey converts given token of Name kind into a protoreflect.MapKey.
// A map key type is any integral or string type.
func (d decoder) unmarshalMapKey(tok json.Token, fd protoreflect.FieldDescriptor) (protoreflect.MapKey, error) {}