Your Question

I don't think this is a good behaviour:

func main(){
    var open = gorm.Open("to a PostgreSQL")
    type A struct {
        AA []int `gorm:"serializer:json "`
        //                             ^-- Look at the whitespace!
    }
    var a []A
    open.Raw(`select '[1,2,3]'::jsonb as aa`).Scan(&a).Error
    // sql: Scan error on column index 0, name "aa": unsupported Scan, storing driver.Value type []uint8 into type *main.A
}

The document you expected this should be explained

Expected answer

IDK |: