Fix: Revert JSON lib used to prepare /bidders/params response #3300
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As part of the v2.0.0 release we switched the JSON library from the standard library
encoding/json
tojson-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 thatencoding/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 marshalingmap[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.