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

Fix: Revert JSON lib used to prepare /bidders/params response #3300

Merged

Conversation

bsardo
Copy link
Collaborator

@bsardo bsardo commented Nov 15, 2023

As part of the v2.0.0 release we switched the JSON library from the standard library encoding/json to json-iter throughout PBS core, however, it had the unintended consequence of changing the response output on the /bidders/params endpoint from a compacted single-line response to a formatted multi-line response. This PR reverts that logic so that encoding/json is used to marshal the response on that endpoint.

All other endpoints were checked for a similar problem and were not affected. The /bidders/params endpoint prepares its response in a different way from all other endpoints by marshaling map[string]json.RawMessage while other endpoints build their response by marshaling structs.

There does not appear to be a way to explicitly compact JSON using json-iter at this time so going back to the standard library in this instance suffices for now.

Copy link
Contributor

@guscarreon guscarreon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bsardo bsardo merged commit 180eb41 into prebid:master Nov 15, 2023
3 checks passed
@bsardo bsardo changed the title Fix: revert JSON lib used to prepare /bidders/params response Fix: Revert JSON lib used to prepare /bidders/params response Nov 15, 2023
svamiftah pushed a commit to sovrn/prebid-server that referenced this pull request Nov 21, 2023
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.

3 participants