Skip to content

Commit a293fb2

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents f331ca5 + 2c13658 commit a293fb2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

bootstrap/services/database/json.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@ func (j JSON) IsNull() bool {
6161
func (j JSON) Equals(j1 JSON) bool {
6262
return bytes.Equal([]byte(j), []byte(j1))
6363
}
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

Comments
 (0)