Skip to content

Commit dd8b894

Browse files
author
Ev Dolzhenko
committed
Change native.request to RawMessage
"The Native Object defines the native advertising opportunity available for bid via this bid request. It will be included as a JSON-encoded string in the bid request’s imp.native field or as a direct JSON object, depending on the choice of the exchange. While OpenRTB 2.3/2.4 supports only JSON-encoded strings, many exchanges have implemented a formal object."
1 parent f0bcd59 commit dd8b894

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

impression.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ var (
1717
// selling all ad positions on a given page as a bundle. Each "imp" object has a required ID so that
1818
// bids can reference them individually. An exchange can also conduct private auctions by
1919
// restricting involvement to specific subsets of seats within bidders.
20+
// The presence of Banner, Video, and/or Native objects
21+
// subordinate to the Imp object indicates the type of impression being offered.
2022
type Impression struct {
2123
ID string `json:"id"` // A unique identifier for this impression
2224
Banner *Banner `json:"banner,omitempty"`

native.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import "encoding/json"
1010
// banner and/or video by also including as Imp subordinates the Banner and/or Video objects,
1111
// respectively. However, any given bid for the impression must conform to one of the offered types.
1212
type Native struct {
13-
Request string `json:"request"` // Request payload complying with the Native Ad Specification.
13+
Request json.RawMessage `json:"request"` // Request payload complying with the Native Ad Specification.
1414
Ver string `json:"ver,omitempty"` // Version of the Native Ad Specification to which request complies; highly recommended for efficient parsing.
1515
API []int `json:"api,omitempty"` // List of supported API frameworks for this impression.
1616
BAttr []int `json:"battr,omitempty"` // Blocked creative attributes

0 commit comments

Comments
 (0)