@@ -233,8 +233,11 @@ type GetImageAttributesOptionsParam struct {
233233}
234234
235235func (r GetImageAttributesOptionsParam ) MarshalJSON () (data []byte , err error ) {
236- type shadow GetImageAttributesOptionsParam
237- return param .MarshalObject (r , (* shadow )(& r ))
236+ type shadow struct {
237+ * GetImageAttributesOptionsParam
238+ MarshalJSON bool `json:"-"` // Prevent inheriting [json.Marshaler] from the embedded field
239+ }
240+ return param .MarshalObject (r , shadow {& r , false })
238241}
239242
240243type ImageOverlayParam struct {
@@ -257,8 +260,11 @@ type ImageOverlayParam struct {
257260}
258261
259262func (r ImageOverlayParam ) MarshalJSON () (data []byte , err error ) {
260- type shadow ImageOverlayParam
261- return param .MarshalObject (r , (* shadow )(& r ))
263+ type shadow struct {
264+ * ImageOverlayParam
265+ MarshalJSON bool `json:"-"` // Prevent inheriting [json.Marshaler] from the embedded field
266+ }
267+ return param .MarshalObject (r , shadow {& r , false })
262268}
263269
264270func OverlayParamOfText (text string ) OverlayUnionParam {
@@ -707,8 +713,11 @@ type SolidColorOverlayParam struct {
707713}
708714
709715func (r SolidColorOverlayParam ) MarshalJSON () (data []byte , err error ) {
710- type shadow SolidColorOverlayParam
711- return param .MarshalObject (r , (* shadow )(& r ))
716+ type shadow struct {
717+ * SolidColorOverlayParam
718+ MarshalJSON bool `json:"-"` // Prevent inheriting [json.Marshaler] from the embedded field
719+ }
720+ return param .MarshalObject (r , shadow {& r , false })
712721}
713722
714723type SolidColorOverlayTransformationParam struct {
@@ -941,8 +950,11 @@ type SubtitleOverlayParam struct {
941950}
942951
943952func (r SubtitleOverlayParam ) MarshalJSON () (data []byte , err error ) {
944- type shadow SubtitleOverlayParam
945- return param .MarshalObject (r , (* shadow )(& r ))
953+ type shadow struct {
954+ * SubtitleOverlayParam
955+ MarshalJSON bool `json:"-"` // Prevent inheriting [json.Marshaler] from the embedded field
956+ }
957+ return param .MarshalObject (r , shadow {& r , false })
946958}
947959
948960// Subtitle styling options.
@@ -1031,8 +1043,11 @@ type TextOverlayParam struct {
10311043}
10321044
10331045func (r TextOverlayParam ) MarshalJSON () (data []byte , err error ) {
1034- type shadow TextOverlayParam
1035- return param .MarshalObject (r , (* shadow )(& r ))
1046+ type shadow struct {
1047+ * TextOverlayParam
1048+ MarshalJSON bool `json:"-"` // Prevent inheriting [json.Marshaler] from the embedded field
1049+ }
1050+ return param .MarshalObject (r , shadow {& r , false })
10361051}
10371052
10381053type TextOverlayTransformationParam struct {
@@ -2201,6 +2216,9 @@ type VideoOverlayParam struct {
22012216}
22022217
22032218func (r VideoOverlayParam ) MarshalJSON () (data []byte , err error ) {
2204- type shadow VideoOverlayParam
2205- return param .MarshalObject (r , (* shadow )(& r ))
2219+ type shadow struct {
2220+ * VideoOverlayParam
2221+ MarshalJSON bool `json:"-"` // Prevent inheriting [json.Marshaler] from the embedded field
2222+ }
2223+ return param .MarshalObject (r , shadow {& r , false })
22062224}
0 commit comments