Skip to content

Omit empty on 'Target json.RawMessage' to avoid sending invalid json in bid request #968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 19, 2019
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions adapters/rubicon/rubicon.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type rubiconImpExtRPTrack struct {

Copy link
Contributor

@guscarreon guscarreon Jul 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are Inventory and Visitor not necessary to omit if empty?

 40 type rubiconParams struct {
 41     AccountId int                `json:"accountId"`
 42     SiteId    int                `json:"siteId"`
 43     ZoneId    int                `json:"zoneId"`
 44     Inventory json.RawMessage    `json:"inventory"`
 45     Visitor   json.RawMessage    `json:"visitor"`
 46     Video     rubiconVideoParams `json:"video"`
 47 }
 48
adapters/rubicon/rubicon.go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot a few lines. Thank you.

type rubiconImpExtRP struct {
ZoneID int `json:"zone_id"`
Target json.RawMessage `json:"target"`
Target json.RawMessage `json:"target,omitempty"`
Track rubiconImpExtRPTrack `json:"track"`
}

Expand All @@ -62,7 +62,7 @@ type rubiconImpExt struct {
}

type rubiconUserExtRP struct {
Target json.RawMessage `json:"target"`
Target json.RawMessage `json:"target,omitempty"`
}

type rubiconExtUserTpID struct {
Expand Down