code: func detectType(v interface{}) Type {
  	if v == nil {
  		return Tnil
  	}
  	switch v.(type) {
  	case bool:
  		return Tbool
  	case int, int32, int64:
  		return Tint64
  	case float32, float64:
  		return Tfloat64
  	case string:
  		return Tstring
  	case []interface{}:
  		return Tarray
  	case map[string]interface{}:
  		return Tmap
  	default:
  		return Tunknown
  	}
  }
docs: // detectType returns type of a value.