Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

[3.0 System.Text.Json]JsonExtensionData should allow non-JsonElement types during serialization - #38306

Merged
ahsonkhan merged 5 commits into
dotnet:masterfrom
MarcoRossignoli:json_extensions2
Jun 12, 2019
Merged

ahsonkhan merged 5 commits into
dotnet:masterfrom
MarcoRossignoli:json_extensions2

Conversation

@MarcoRossignoli

@MarcoRossignoli MarcoRossignoli commented Jun 6, 2019 •

Copy link
Copy Markdown
Member

fixes https://github.com/dotnet/corefx/issues/38238

If we have Dictionary<string,JsonElement> we'll emit json properties it's my understanding that isn't needed, I thought that we wanted to have JsonElement as property.
If we have Dictionary<string,object> we'll emit standard dictionary
We serialize all like normal dictionary.
Deserialization produce always Dictionary<string,JsonElement>

cc: @steveharter @ahsonkhan @pakrym

@ahsonkhan

Copy link
Copy Markdown

cc @pranavkm (not @pakrym) :p

@ahsonkhan ahsonkhan added this to the 3.0 milestone Jun 7, 2019
@MarcoRossignoli

Copy link
Copy Markdown
Member Author

cc @pranavkm (not @pakrym) :p

OMG sorry...autocomplete 😄

BTW @steveharter @ahsonkhan can you review?

@ahsonkhan ahsonkhan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Otherwise, LGTM.

@MarcoRossignoli

Copy link
Copy Markdown
Member Author

@steveharter @ahsonkhan PTAL

@steveharter steveharter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are some other nits, but overall LGTM - removed a few LOC and adjusted the tests.

@MarcoRossignoli

Copy link
Copy Markdown
Member Author

@steveharter @ahsonkhan I removed redundant test, if we postpone updates on type of exception thrown this is it's ready to go.

@ahsonkhan

Copy link
Copy Markdown

@ahsonkhan
ahsonkhan merged commit 4e16caa into dotnet:master Jun 12, 2019
@MarcoRossignoli
MarcoRossignoli deleted the json_extensions2 branch June 12, 2019 15:09
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…types during serialization (dotnet/corefx#38306)

* fix serialization

* serialize all as dictionary

* address PR feedback

* address PR feedback

* remove redundant test


Commit migrated from dotnet/corefx@4e16caa
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.

[System.Text.Json] JsonExtensionData should allow non-JsonElement types during serialization

3 participants