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

Method DecodeString

decode_string.go:10–15  ·  view source on GitHub ↗

DecodeString reads the next JSON-encoded value from the decoder's input (io.Reader) and stores it in the string pointed to by v. See the documentation for Unmarshal for details about the conversion of JSON into a Go value.

(v *string)

Source from the content-addressed store, hash-verified

8//
9// See the documentation for Unmarshal for details about the conversion of JSON into a Go value.
10func (dec *Decoder) DecodeString(v *string) error {
11 if dec.isPooled == 1 {
12 panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
13 }
14 return dec.decodeString(v)
15}
16func (dec *Decoder) decodeString(v *string) error {
17 for ; dec.cursor < dec.length || dec.read(); dec.cursor++ {
18 switch dec.data[dec.cursor] {

Callers 4

ExampleNewDecoderFunction · 0.95
ExampleBorrowDecoderFunction · 0.80

Calls 2

decodeStringMethod · 0.95

Tested by 4

ExampleNewDecoderFunction · 0.76
ExampleBorrowDecoderFunction · 0.64