-
Notifications
You must be signed in to change notification settings - Fork 865
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
chore: add System.Text.Json attributes #9341
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
... and 1 file with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Does |
It can't automatically generate schema from C# code that use custom |
* chore: add JsonExtensionData attribute of System.Text.Json * chore: add JsonIgnore attribute of System.Text.Json * chore: add JsonConstructor attribute of System.Text.Json * chore: add Newtonsoft.Json namespace qualifier of JsonConverter * chore: add JsonPropertyName attribute of System.Text.Json
What included in this PR
This PR add following System.Text.Json's attributes to existing Newtonsoft.Json based models.
JsonPropertyName
JsonIgnore
JsonExtensionData
JsonConstructor
What's tested on my local environment
In this PR. attributes are manually added.
So I've verified attributes are aligned with existing
Newtonsoft.Json
value with reflection API.Background
This PR is intended to be used for #8968. (Because
JsonSchema.Net
support onlySystem.Text.Json
attributes)So JsonConverter for
System.Text.Json
is not added in this PR.To fully migrate to
System.Text.Json
. #8137 to be resolved.