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

fix: Added json marshaling for []*struct -> json #248

Merged
merged 2 commits into from
May 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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