Skip to content

Commit

Permalink
Native - Add omitempty on field to reduce the work of the parser
Browse files Browse the repository at this point in the history
Clement3 committed Jun 7, 2021
1 parent 8124ead commit 2c76a0b
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion native1/response/link.go
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ type Link struct {
// string
// Description:
// Landing URL of the clickable link.
URL string `json:"url"`
URL string `json:"url,omitempty"`

// Field:
// clicktrackers
2 changes: 1 addition & 1 deletion native1/response/response.go
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ type Response struct {
// This is default link object for the ad.
// Individual assets can also have a link object which applies if the asset is activated(clicked).
// If the asset doesn’t have a link object, the parent link object applies.
Link Link `json:"link"`
Link Link `json:"link,omitempty"`

// Field:
// imptrackers
2 changes: 1 addition & 1 deletion openrtb2/bid.go
Original file line number Diff line number Diff line change
@@ -299,5 +299,5 @@ type Bid struct {
}

type NativeAdMObject struct {
Native native1.Response `json:"native"`
Native native1.Response `json:"native,omitempty"`
}

0 comments on commit 2c76a0b

Please sign in to comment.