We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f331ca5 + 2c13658 commit a293fb2Copy full SHA for a293fb2
1 file changed
bootstrap/services/database/json.go
@@ -61,3 +61,9 @@ func (j JSON) IsNull() bool {
61
func (j JSON) Equals(j1 JSON) bool {
62
return bytes.Equal([]byte(j), []byte(j1))
63
}
64
+
65
+func (j *JSON) Trans(v interface{}) error {
66
+ b, _ := j.Value()
67
+ err := json.Unmarshal([]byte(b.(string)), &v)
68
+ return err
69
+}
0 commit comments