MCPcopy Create free account
hub / github.com/francoispqt/gojay / String

Method String

decode_string.go:241–248  ·  view source on GitHub ↗

String decodes the JSON value within an object or an array to a *string. If next key is not a JSON string nor null, InvalidUnmarshalError will be returned.

(v *string)

Source from the content-addressed store, hash-verified

239// String decodes the JSON value within an object or an array to a *string.
240// If next key is not a JSON string nor null, InvalidUnmarshalError will be returned.
241func (dec *Decoder) String(v *string) error {
242 err := dec.decodeString(v)
243 if err != nil {
244 return err
245 }
246 dec.called |= 1
247 return nil
248}
249
250// StringNull decodes the JSON value within an object or an array to a **string.
251// If next key is not a JSON string nor null, InvalidUnmarshalError will be returned.

Callers 15

SliceStringMethod · 0.95
AddStringMethod · 0.95
ExampleDecodeObjectFuncFunction · 0.95
TestEncodeTimeFunction · 0.45
TestAddTimeKeyFunction · 0.45
TestAddTimeFunction · 0.45
UnmarshalJSONArrayMethod · 0.45
UnmarshalJSONArrayMethod · 0.45
TestDecoderIntFunction · 0.45
TestDecoderIntNullFunction · 0.45
TestDecoderInt64Function · 0.45
TestDecoderInt64NullFunction · 0.45

Calls 1

decodeStringMethod · 0.95

Tested by 15

ExampleDecodeObjectFuncFunction · 0.76
TestEncodeTimeFunction · 0.36
TestAddTimeKeyFunction · 0.36
TestAddTimeFunction · 0.36
UnmarshalJSONArrayMethod · 0.36
UnmarshalJSONArrayMethod · 0.36
TestDecoderIntFunction · 0.36
TestDecoderIntNullFunction · 0.36
TestDecoderInt64Function · 0.36
TestDecoderInt64NullFunction · 0.36
TestDecoderInt32Function · 0.36
TestDecoderInt32NullFunction · 0.36