go-gorm/datatypes

how to set json type?

YankeeTube opened this issue · 1 comments

Your Question

How do I set the json type in postgresql? Only jsonb type is set.

The document you expected this should be explained

datatypes Doc

Expected answer

type Model struct {
  Values datatypes.JSON
}
type Model struct {
  Values map[string]interface{} `gorm:"type:json"`
}