type Something struct{ Contact []string `json:"contact_number" gorm:"type:text[]"` } type Post struct { Title string Tags pq.StringArray } type Post struct { Title string Tags pq.StringArray `gorm:"type:text[]"` } type Post struct { Title string Tags []string `gorm:"serializer:json"` } type Post struct { Title string Tags []string `gorm:"type:text[]; serializer:json"` }