Skip to content

Conversation

@manandre
Copy link
Contributor

Fixes #97617

@ghost ghost added area-System.Text.Json community-contribution Indicates that the PR has been added by a community member labels Jan 30, 2024
@ghost
Copy link

ghost commented Jan 30, 2024

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #97617

Author: manandre
Assignees: -
Labels:

area-System.Text.Json

Milestone: -


MyKeyedCollection mkc = new MyKeyedCollection() { 1, 2, 3 };
Assert.Equal("[1,2,3]", await Serializer.SerializeWrapper(mkc));
Assert.Equal("[1,2,3]", await Serializer.SerializeWrapper<KeyedCollection<int, int>>(mkc));
Copy link
Member

Choose a reason for hiding this comment

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

What about deserialization tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deserialization test added.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@eiriktsarpalis eiriktsarpalis left a comment

Choose a reason for hiding this comment

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

Thanks!

@eiriktsarpalis eiriktsarpalis merged commit 063447d into dotnet:main Feb 7, 2024
@manandre manandre deleted the stj-my-keyed-collection branch February 7, 2024 11:11
@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Text.Json community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Text.Json doesn't support KeyedCollection when serializing with source generation

2 participants