diff --git a/types/mapper/annotation_field.go b/types/mapper/annotation_field.go index 821621a3d..583a3e73e 100644 --- a/types/mapper/annotation_field.go +++ b/types/mapper/annotation_field.go @@ -38,7 +38,7 @@ func (e AnnotationField) FromInternal(data map[string]interface{}) { func (e AnnotationField) ToInternal(data map[string]interface{}) { v, ok := data[e.Field] - if ok { + if ok && v != nil { if e.Object || e.List { if bytes, err := json.Marshal(v); err == nil { v = string(bytes)