Skip to content

Expose information about JsonPropertyInfo being readable/writable #77307

@krwq

Description

@krwq

It's very useful information to know if property is readable/writable (i.e. generating docs). But this information is currently not exactly obvious.

  • If JsonPropertyInfo.Get != null then we know property is readable
  • If JsonPropertyInfo.Set != null then we know property is writable

but above is not complete:

  • If 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions