I have a requirement where the native bid request is present in another field. following is my impression json.
{
"imp": [
{
"id": "1",
"tagid": "12345",
"secure": 0,
"native": {
"requestobj": {
"layout": 2,
"assets": [
{
"id": 1,
"required": 1,
"img": {
"type": 1,
"wmin": 64,
"hmin": 64,
"mimes": []
}
},
{
"id": 2,
"required": 0,
"data": {
"type": 2,
"len": 40
}
}
]
},
"api": [],
"ver": "1"
},
"instl": 0
}
]
}
package openrtb
import (
"github.com/bsm/openrtb/native/request"
)
// This object represents a native type impression. Native ad units are intended to blend seamlessly into
// the surrounding content (e.g., a sponsored Twitter or Facebook post). As such, the response must be
// well-structured to afford the publisher fine-grained control over rendering.
// The presence of a Native as a subordinate of the Imp object indicates that this impression is offered as
// a native type impression. At the publisher’s discretion, that same impression may also be offered as
// banner and/or video by also including as Imp subordinates the Banner and/or Video objects,
// respectively. However, any given bid for the impression must conform to one of the offered types.
type Native struct {
Request Extension `json:"request"` // Request payload complying with the Native Ad Specification.
Ver string `json:"ver,omitempty"` // Version of the Native Ad Specification to which request complies; highly recommended for efficient parsing.
API []int `json:"api,omitempty"` // List of supported API frameworks for this impression.
BAttr []int `json:"battr,omitempty"` // Blocked creative attributes
Ext Extension `json:"ext,omitempty"`
NativeJSON request.Request `json:"requestobj,omitempty"` // Native Json Object.
}
can't load package: import cycle not allowed
package github.com/bsm/openrtb
imports github.com/bsm/openrtb/native/request
imports github.com/bsm/openrtb
Can anyone of you guys help me out here, how do we handle this case. ?