code: func (d *Decoder) array() ([]interface{}, error) {
  	// the '[' token already scanned
  	d.pos++
  
  	var (
  		c     byte
  		v     interface{}
  		err   error
  		array = make([]interface{}, 0)
  	)
  
  	// look ahead for ] - if the array is empty.
  	if c = d.skipSpaces(); c == ']' {
  		d.pos++
  		goto out
  	}
  
  scan:
  	if v, err = d.any(); err != nil {
  		goto out
  	}
  
  	array = append(array, v)
  
  	// next token must be ',' or ']'
  	if c = d.skipSpaces(); c == ',' {
  		d.pos++
  		goto scan
  	} else if c == ']' {
  		d.pos++
  	} else {
  		err = d.error(c, "after array element")
  	}
  
  out:
  	return array, err
  }
docs: // array accept valid JSON array value