Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
fix: Added json marshaling for []*struct -> json (#248)
Browse files Browse the repository at this point in the history
* fix: added positive type validation for json -> []*struct

* fix
  • Loading branch information
amanenk authored May 10, 2022
1 parent 488f83d commit bcbc3fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion provider/schema/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func (c Column) checkType(v interface{}) bool {
if c.Type == TypeIntArray && reflect.Int == itemKind {
return true
}
if c.Type == TypeJSON && reflect.Struct == itemKind {
if c.Type == TypeJSON && (reflect.Struct == itemKind || reflect.Ptr == itemKind) {
return true
}
if c.Type == TypeUUIDArray && reflect2.TypeOf(v).String() == "uuid.UUID" || reflect2.TypeOf(v).String() == "*uuid.UUID" {
Expand Down

0 comments on commit bcbc3fa

Please sign in to comment.