-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Can we enable to set non-public properties on System.Text.Json #6095
Comments
hikalkan
changed the title
Can we enable to set private/protected properties on System.Text.Json
Can we enable to set non-public properties on System.Text.Json
Nov 6, 2020
Every non-public setter field marking with [JsonInclude] attribute. |
Using attribute is not a good solution. : ) |
I think so :D But this is the approved solution now :( |
There is currently no good solution, move to 4.1 . |
dotnet/runtime#42399 maybe help this. |
We need wait for dotnet/runtime#36785 |
.NET 7.0 dotnet/runtime#31511 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System.Text.Json doesn't set non-public properties by default on deserialization.
Is there an option to enable to set them (dotnet/runtime#29743 ?)? If so, it is better to enable it.
The text was updated successfully, but these errors were encountered: