Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(openrtb): Extension refactor part1.2 - Device #120

Conversation

HaibinZhang-Vungle
Copy link
Contributor

@HaibinZhang-Vungle HaibinZhang-Vungle commented Apr 18, 2022

Update extension fields of BidRequest and its sub structs. Change them to json.RawMessage.
Here are two reason to do that:
1: Avoid the loss of precise while unmarshal data to interface{}. The build-in json and easyjson both use the type of float64 to parse a number in json string. If it is an int64 number, some information will loss.
2: Avoid the change between interface{} and specified structs. Using json.RawMessage can make sure there is only one convert from the beginning.
This is the second part of this work, update device's extension.

@HaibinZhang-Vungle HaibinZhang-Vungle changed the title refactor(openrtb): Use json.RawMessage as the extension object part2 - Device refactor(openrtb): Use json.RawMessage as the extension object part3 - Device Apr 20, 2022
@HaibinZhang-Vungle HaibinZhang-Vungle merged commit f1a808a into wip-pbj-3419-raw-message-extension Apr 29, 2022
@HaibinZhang-Vungle HaibinZhang-Vungle changed the title refactor(openrtb): Use json.RawMessage as the extension object part3 - Device refactor(openrtb): Extension refactor part1.2 - Device Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants