I am trying to read columns to an embedded struct usng gorm, the table has a Json column and I would like to read it a defined struct. How can I achieve this one ??
type Permissions struct {
// all other columns
Rules []Rule // this is saved as a json column in db
}
type Rule struct {
// embedded columns here too
}
stringin your gorm struct for the json column and then unmarshal the json into the according struct.