MCPcopy
hub / github.com/protocolbuffers/protobuf-go / ParsedString

Method ParsedString

internal/encoding/json/decode_token.go:115–120  ·  view source on GitHub ↗

ParsedString returns the string value for a JSON string token or the read value in string if token is not a string.

()

Source from the content-addressed store, hash-verified

113// ParsedString returns the string value for a JSON string token or the read
114// value in string if token is not a string.
115func (t Token) ParsedString() string {
116 if t.kind == String {
117 return t.str
118 }
119 panic(fmt.Sprintf("Token is not a String: %v", t.RawString()))
120}
121
122// Float returns the floating-point number if token kind is Number.
123//

Callers 14

unmarshalAnyMethod · 0.80
findTypeURLFunction · 0.80
unmarshalKnownValueMethod · 0.80
unmarshalDurationMethod · 0.80
unmarshalTimestampMethod · 0.80
unmarshalFieldMaskMethod · 0.80
unmarshalScalarMethod · 0.80
unmarshalIntFunction · 0.80
unmarshalUintFunction · 0.80
unmarshalFloatFunction · 0.80
unmarshalBytesFunction · 0.80
unmarshalEnumFunction · 0.80

Calls 1

RawStringMethod · 0.95

Tested by 2

checkMethod · 0.64
BenchmarkStringFunction · 0.64