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

Deprecate responseJSON #3502

Merged
merged 4 commits into from
Oct 4, 2021
Merged

Deprecate responseJSON #3502

merged 4 commits into from
Oct 4, 2021

Conversation

jshier
Copy link
Contributor

@jshier jshier commented Oct 3, 2021

Goals ⚽

Despite the extensive documentation, responseJSON seems to be greatly misunderstood. As I've observed in many code samples on StackOverflow and elsewhere, people seem to think you need to call it for every response that returns JSON, even if you then want to use JSONDecoder on the Data returned. Since this convenience is largely unneeded nowadays, it seems like a good idea to deprecate and point everyone to the much superior responseDecodable.

Implementation Details 🚧

This PR simply deprecates the responseJSON methods and JSONResponseSerializer.

Testing Details 🔍

This PR updates our tests to replace responseJSON with responseDecodable, except for tests which exercised responseJSON specifically, which have themselves been deprecated as well.

@jshier jshier force-pushed the update/deprecate-responseJSON branch from f89bb13 to dc7416d Compare October 3, 2021 01:53
Copy link
Member

@cnoon cnoon left a comment

Choose a reason for hiding this comment

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

Looks good @jshier, and completely makes sense to deprecate. 👌🏻

@jshier jshier changed the title Deprecate responseJSON. Deprecate responseJSON Oct 4, 2021
@jshier jshier merged commit effb907 into master Oct 4, 2021
@jshier jshier deleted the update/deprecate-responseJSON branch October 4, 2021 16:07
@jshier jshier added this to the 5.5.0 milestone Dec 13, 2021
jshier added a commit that referenced this pull request Jan 15, 2022
* Deprecate responseJSON.

* Fix tests.

* Fix tests for responseDecodable.

* Increase upload size for reliability.
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.

None yet

2 participants