Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Use RawJSON for Ext fields

Compare
Choose a tag to compare
@mxmCherry mxmCherry released this 19 Jan 20:14
· 237 commits to master since this release

Changes since v2.0.1:

  • changed Ext type in all OpenRTB objects from interface{} to RawJSON

Proposed in: #8

Pros:

  • easier to consume Ext in non-top objects (no need to convert from map[string]interface{} or similar types - see encoding/json.Unmarshal)
  • faster decoding (no need to detect/create complex types)

Cons:

  • less convenient encoding (need to encode Ext values first and then set JSON where needed)