You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dsps should forcibly reply native responses when requests contains native request.
hence the following code should be using the bid request to determine if impression is native based.
implicit val admOneOfDecoder: Decoder[SeatBid.Bid.AdmOneof] = { cursor =>
cursor.focus.map {
case json if json.isString =>
json.asString
.map(s => {
decode[NativeResponse](s)
.map(AdmOneof.AdmNative) // the string can be decoded as native
.getOrElse(AdmOneof.Adm(s)) // the string cannot be decoded
})
.getOrElse(AdmOneof.Empty) // there's no string or it's impossible to decode it
case json if json.isObject =>
json.as[NativeResponse].map(AdmOneof.AdmNative).getOrElse(AdmOneof.Empty)
}.orElse(Some(AdmOneof.Empty)).map(Right(_)).get
}
The text was updated successfully, but these errors were encountered:
Dsps should forcibly reply native responses when requests contains native request.
hence the following code should be using the bid request to determine if impression is native based.
The text was updated successfully, but these errors were encountered: