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

Method ArrayNull

decode_array.go:234–242  ·  view source on GitHub ↗

ArrayNull decodes the JSON value within an object or an array to a UnmarshalerJSONArray. v should be a pointer to an UnmarshalerJSONArray, if `null` value is encountered in JSON, it will leave the value v untouched, else it will create a new instance of the UnmarshalerJSONArray behind v.

(v interface{})

Source from the content-addressed store, hash-verified

232// if `null` value is encountered in JSON, it will leave the value v untouched,
233// else it will create a new instance of the UnmarshalerJSONArray behind v.
234func (dec *Decoder) ArrayNull(v interface{}) error {
235 newCursor, err := dec.decodeArrayNull(v)
236 if err != nil {
237 return err
238 }
239 dec.cursor = newCursor
240 dec.called |= 1
241 return nil
242}
243
244// Index returns the index of an array being decoded.
245func (dec *Decoder) Index() int {

Callers 3

AddArrayNullMethod · 0.95
UnmarshalJSONObjectMethod · 0.80
TestDecodeObjectNullFunction · 0.80

Calls 1

decodeArrayNullMethod · 0.95

Tested by 2

UnmarshalJSONObjectMethod · 0.64
TestDecodeObjectNullFunction · 0.64