You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should add some tests ensuring that the serializer doesn't deserialize/serialize non-public properties under any circumstance including:
when a derived type adds a non-public new property which collides with a public property defined on the parent
when there are property name collisions between public/non-public properties due to [JsonPropertyName]
when there are property name collisions between public/non-public properties due to JsonNamingPolicy
all such tests should have variants checking that public properties that are [JsonIgnore]'d are not accidentally (de)serialized due to mismatching JsonPropertyInfo with a colliding non-public member.
Curious minds...is System.Test.Json suppose to be a plugin replacement to Json.Net ? cause if so this is going the wrong direction - probably for a very broad development community that does to to re-write all their code.
ghost
locked as resolved and limited conversation to collaborators
Dec 10, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Follow up from #2278.
We should add some tests ensuring that the serializer doesn't deserialize/serialize non-public properties under any circumstance including:
new
property which collides with a public property defined on the parent[JsonPropertyName]
JsonNamingPolicy
all such tests should have variants checking that public properties that are
[JsonIgnore]
'd are not accidentally (de)serialized due to mismatchingJsonPropertyInfo
with a colliding non-public member.https://dotnetfiddle.net/2BD7bK goes over a few expecations.
The text was updated successfully, but these errors were encountered: