Skip to content

Support custom decoders in decoding completions#2

Merged
mattmassicotte merged 1 commit intoChimeHQ:mainfrom
ryanslikesocool:main
Feb 4, 2025
Merged

Support custom decoders in decoding completions#2
mattmassicotte merged 1 commit intoChimeHQ:mainfrom
ryanslikesocool:main

Conversation

@ryanslikesocool
Copy link
Contributor

Added arguments to decoding functions to support decoders other than JSONDecoder.
This change requires importing Combine for TopLevelDecoder, but I figured it's probably fine considering the target platforms for this package.
Modified functions still use JSONDecoder() as a default argument, but will break for consumers in places where the function is referenced by name (withDecodingCompletion(isolation:function:_:) -> withDecodingCompletion(isolation:function:using:_:)).

@mattmassicotte
Copy link
Contributor

Wow cool! I didn't even know such a thing was possible. Thanks for doing this!

(Don't worry about CI, I clearly have to update that)

@mattmassicotte mattmassicotte merged commit 507cf24 into ChimeHQ:main Feb 4, 2025
0 of 2 checks passed
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