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

Support async KeyValuePair (de)serialization #36607

Merged
merged 3 commits into from
May 28, 2020
Merged

Conversation

layomia
Copy link
Contributor

@layomia layomia commented May 17, 2020

Refactors the KeyValuePair converter to use logic for deserializing with parameterized ctors and leverage the async support (for reading and writing).

Fixes #32148 (no longer applicable following this change).

@layomia layomia added this to the 5.0 milestone May 17, 2020
@layomia layomia self-assigned this May 17, 2020
@jozkee
Copy link
Member

jozkee commented May 20, 2020

Do we have stream-based tests with KeyValuePair?

@layomia
Copy link
Contributor Author

layomia commented May 22, 2020

Do we have stream-based tests with KeyValuePair?

Yes, see the diff in Stream.Collections.cs.

{
// Used for value converters that need to re-enter the serializer since it will support JsonPath
// and reference handling.
internal abstract class JsonValueConverter<T> : JsonConverter<T>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This converter type may come back depending on work in #36785.

Copy link
Member

@steveharter steveharter left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@layomia layomia merged commit 1c5e253 into dotnet:master May 28, 2020
@layomia layomia deleted the kvp branch May 28, 2020 17:15
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The KeyValuePair converter should cache the converters for TKey and TValue
4 participants