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

Use self as the decoder when decoding a ByteBuffer #1221

Merged
merged 3 commits into from Nov 6, 2019

Conversation

@gwynne
Copy link
Contributor

gwynne commented Nov 5, 2019

Allow actually configuring the JSONDecoder used when decoding things from a ByteBuffer instead of being stuck with the often useless defaults.

Motivation:

Parity with encoding, and most especially being able to configure a date decoding strategy.

Modifications:

Passes the missing parameter to the ByteBuffer method.

Result:

The invoked JSONDecoder will be used instead of a default-initialized one.

This allows actually configuring the `JSONDecoder` instead of being stuck with the often useless defaults.
Copy link
Contributor

Lukasa left a comment

Looks great @gwynne! Do you mind adding a test?

@weissi weissi requested a review from Lukasa Nov 6, 2019
@weissi
weissi approved these changes Nov 6, 2019
Copy link
Member

weissi left a comment

Thank you Gwynne, that's awesome!

@weissi weissi requested a review from glbrntt Nov 6, 2019
@glbrntt
glbrntt approved these changes Nov 6, 2019
Copy link
Contributor

glbrntt left a comment

Awesome, thanks @gwynne!

@weissi weissi merged commit 1a9a543 into apple:master Nov 6, 2019
4 checks passed
4 checks passed
pull request validation (5.0) Build finished.
Details
pull request validation (5.1) Build finished.
Details
pull request validation (api breakage) Build finished.
Details
pull request validation (sanity) Build finished.
Details
@gwynne gwynne deleted the gwynne:patch-2 branch Nov 6, 2019
@weissi weissi added this to the 2.10.0 milestone Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.