code: func (gr *GenericRecord) Map() map[string]interface{} {
  	m := make(map[string]interface{})
  	for k, v := range gr.fields {
  		if r, ok := v.(*GenericRecord); ok {
  			v = r.Map()
  		}
  		if a, ok := v.([]interface{}); ok {
  			slice := make([]interface{}, len(a))
  			for i, elem := range a {
  				if rec, ok := elem.(*GenericRecord); ok {
  					elem = rec.Map()
  				}
  				slice[i] = elem
  			}
  			v = slice
  		}
  		m[k] = v
  	}
  	return m
  }
docs: // Map returns a map representation of this GenericRecord.