Closed saifat29 closed 1 year ago
I've also opened an issue on https://github.com/bsm/openrtb/issues/105
Hello @saifat29, thank you for submitting your question. May you please provide a use case where this change is needed? Do you need to distinguish cases where W and H are 0s and nils? Do you need to unmarshal data to the struct other than openrtb?
Hi @saifat29, just checking in to see if you can shed some light on use cases as requested by @VeronikaSolovei9. Thanks!
Sorry for the delay.
The issue is that some demand partners make a distinction between the absence of values for w
and h
and when these values are set to zero. Their system reacts differently to the case where "w": 0, "h": 0
is present compared to when these fields are completely absent. As a result, they have asked us to provide values for these fields even though they are set to zero, but we are unable to do so because json.Marshal
disregards these fields due to the omitempty
tag.
Also I don't see anything in the IAB spec against it. Let me know your thoughts, if it's a broad enough problem we should solve it.
Understood. 👍
Discussed within Prebid and several other folks agree with you. We have a PR out now to address this issue. We reviewed the entire OpenRTB 2.x object model and changes a few other fields which have the potential for nil to be interpreted differently from a zero value.
Fixed in v20.0.0.
Many RTB exchanges expect width and height to be 0x0 for them to support dynamic ad sizes for Video ads. If we can remove the
omitempty
tag fromw
andh
for only theVideo
object the zero values would begin to pass.Let me know your thoughts.