-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Expose information about JsonPropertyInfo being readable/writable #77307
Comments
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsIt's very useful information to know if property is readable/writable (i.e. generating docs). But this information is currently not exactly obvious.
but above is not complete:
while first two are easy to check the last one is not exactly trivial due to this information not being exposed. Somewhat related to #71944 - it could potentially be solved as part of that issue but this issue is much more scoped than that.
|
It will largely depend on how #71944 gets implemented. Clearly, we need to expose We have received feedback from users who believe that the current restriction is too strict, so perhaps it makes sense to completely decouple |
changing milestone to 8.0 - we should at least consider this for 8.0 |
@eiriktsarpalis I think I'd go the other way - from JSON point of view there are really no parameters. Only serialization has such concept - I'd rather go in direction of adding bool flag on the JsonPropertyInfo, i.e. |
Note that ordering of constructor parameters is significant and might not match the declared serialization order (which is also influenced by the |
It's very useful information to know if property is readable/writable (i.e. generating docs). But this information is currently not exactly obvious.
JsonPropertyInfo.Get != null
then we know property is readableJsonPropertyInfo.Set != null
then we know property is writablebut above is not complete:
JsonPropertyInfo.Get != null
and there is parametrized ctor with related property property is also writable (technically it's init but that's transparent to user)while first two are easy to check the last one is not exactly trivial due to this information not being exposed.
Somewhat related to #71944 - it could potentially be solved as part of that issue but this issue is much more scoped than that.
The text was updated successfully, but these errors were encountered: