(dec *Decoder)
| 437 | type testChannelArray chan *TestObj |
| 438 | |
| 439 | func (c *testChannelArray) UnmarshalJSONArray(dec *Decoder) error { |
| 440 | obj := &TestObj{} |
| 441 | if err := dec.AddObject(obj); err != nil { |
| 442 | return err |
| 443 | } |
| 444 | *c <- obj |
| 445 | return nil |
| 446 | } |
| 447 | |
| 448 | func TestDecoderSliceNull(t *testing.T) { |
| 449 | json := []byte(`null`) |