Skip to content
New issue

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

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

Already on GitHub? # to your account

Add inherited JSONDecoder property on APIComponent #49

Merged
merged 6 commits into from
Jan 30, 2024

Conversation

tdeleon
Copy link
Owner

@tdeleon tdeleon commented Jan 26, 2024

Add decoder static property to APIComponent. The property should be propagated down through Requests, allowing overrides at each level. Currently, customized decoders must be specified each time a request is sent (in the send() methods). Often times an API will need to use the same decoder for multiple Requests, and it is tedious to pass this in on each request.

The Request send() methods will allow overriding through the existing method signatures. This will also ensure source compatibility is maintained, along with existing default behavior (when no decoder is specified).

If the values are not specified, there should be default protocol implementations of JSONDecoder().

@tdeleon tdeleon added this to the 2.2.0 milestone Jan 26, 2024
@tdeleon tdeleon added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 26, 2024
@tdeleon tdeleon linked an issue Jan 26, 2024 that may be closed by this pull request
@tdeleon tdeleon self-assigned this Jan 26, 2024
@tdeleon tdeleon changed the base branch from main to develop January 26, 2024 17:50
@tdeleon tdeleon merged commit 633dc63 into develop Jan 30, 2024
11 checks passed
@tdeleon tdeleon deleted the 29-add-encoder-decoder-properties branch January 30, 2024 00:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add JSONDecoder static properties to APIComponent
1 participant