MCPcopy Create free account
hub / github.com/bcicen/jstream / decode

Method decode

decoder.go:141–152  ·  view source on GitHub ↗

Decode parses the JSON-encoded data and returns an interface value

()

Source from the content-addressed store, hash-verified

139
140// Decode parses the JSON-encoded data and returns an interface value
141func (d *Decoder) decode() {
142 defer close(d.metaCh)
143 d.skipSpaces()
144 for d.remaining() > 0 {
145 _, err := d.emitAny()
146 if err != nil {
147 d.err = err
148 break
149 }
150 d.skipSpaces()
151 }
152}
153
154func (d *Decoder) emitAny() (interface{}, error) {
155 if d.pos >= atomic.LoadInt64(&d.end) {

Callers 1

StreamMethod · 0.95

Calls 3

skipSpacesMethod · 0.95
emitAnyMethod · 0.95
remainingMethod · 0.80

Tested by

no test coverage detected