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

Method Object

decode_object.go:371–386  ·  view source on GitHub ↗

Object decodes the JSON value within an object or an array to a UnmarshalerJSONObject.

(value UnmarshalerJSONObject)

Source from the content-addressed store, hash-verified

369
370// Object decodes the JSON value within an object or an array to a UnmarshalerJSONObject.
371func (dec *Decoder) Object(value UnmarshalerJSONObject) error {
372 initialKeysDone := dec.keysDone
373 initialChild := dec.child
374 dec.keysDone = 0
375 dec.called = 0
376 dec.child |= 1
377 newCursor, err := dec.decodeObject(value)
378 if err != nil {
379 return err
380 }
381 dec.cursor = newCursor
382 dec.keysDone = initialKeysDone
383 dec.child = initialChild
384 dec.called |= 1
385 return nil
386}
387
388// ObjectNull decodes the JSON value within an object or an array to a UnmarshalerJSONObject.
389// v should be a pointer to an UnmarshalerJSONObject,

Callers 15

AddObjectMethod · 0.95
UnmarshalJSONArrayMethod · 0.45
MarshalJSONArrayMethod · 0.45
UnmarshalJSONArrayMethod · 0.45
MarshalJSONArrayMethod · 0.45
UnmarshalJSONObjectMethod · 0.45
UnmarshalJSONArrayMethod · 0.45
MarshalJSONArrayMethod · 0.45
UnmarshalJSONArrayMethod · 0.45
MarshalJSONArrayMethod · 0.45
UnmarshalJSONObjectMethod · 0.45
UnmarshalJSONArrayMethod · 0.45

Calls 1

decodeObjectMethod · 0.95

Tested by

no test coverage detected