code: func (d *Decoder) object() (map[string]interface{}, error) {
  	// the '{' token already scanned
  	d.pos++
  
  	var (
  		c   byte
  		k   string
  		v   interface{}
  		err error
  		obj = make(map[string]interface{})
  	)
  
  	// look ahead for } - if the object has no keys.
  	if c = d.skipSpaces(); c == '}' {
  		d.pos++
  		return obj, nil
  	}
  
  	for {
  		// read string key
  		if c = d.skipSpaces(); c != '"' {
  			err = d.error(c, "looking for beginning of object key string")
  			break
  		}
  		if k, err = d.string(); err != nil {
  			break
  		}
  
  		// read colon before value
  		c = d.skipSpaces()
  		if c != ':' {
  			err = d.error(c, "after object key")
  			break
  		}
  		d.pos++
  
  		// read and assign value
  		if v, err = d.any(); err != nil {
  			break
  		}
  
  		obj[k] = v
  
  		// next token must be ',' or '}'
  		if c = d.skipSpaces(); c == '}' {
  			d.pos++
  			break
  		} else if c == ',' {
  			d.pos++
  		} else {
  			err = d.error(c, "after object key:value pair")
  			break
  		}
  	}
  
  	return obj, err
  }
docs: // object accept valid JSON array value