Skip to content

Commit

Permalink
Add use of non-public constructors (#22461)
Browse files Browse the repository at this point in the history
  • Loading branch information
gewarren authored Jan 25, 2021
1 parent 8570ae4 commit c503251
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If none of these constructors are available, a <xref:System.NotSupportedExceptio
## Recommended action

- If you own the type and it's feasible, make the parameterless constructor public.
- Otherwise, implement a `JsonConverter<T>` for the type and control the deserialization behavior.
- Otherwise, implement a <xref:System.Text.Json.Serialization.JsonConverter%601> for the type and control the deserialization behavior. You can call a non-public constructor from a <xref:System.Text.Json.Serialization.JsonConverter%601> implementation if C# accessibility rules for that scenario allow it.

## Affected APIs

Expand Down

0 comments on commit c503251

Please sign in to comment.