dotnet / dotnet/docs

Document exactly what customizations are allowed for what JsonTypeInfo.Kind

Open
#32,685 2 comments 0 reactions 0 assignees View on GitHub
dotnet-fundamentals/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

The documentation on what exactly is allowed for each JsonTypeInfo.Kind are very vague. Nothing is said about what is allowed for JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary. Or, documentation of each property of JsonTypeInfo should state exactly which values of Kind it is allowed to be set on, not a statement like "It throws an InvalidOperationException when it is not supported for the current metadata Kind." which is what most of the properties of JsonTypeInfo give, which really tells you nothing.

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: 3ab6f61a-837d-ddc8-a942-9c32fa6e1a44
* Version Independent ID: 36e7c218-890e-5697-fc86-9a4886a3ed7d
* Content: [Custom serialization and deserialization contracts](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/custom-contracts)
* Content Source: [docs/standard/serialization/system-text-json/custom-contracts.md](https://github.com/dotnet/docs/blob/main/docs/standard/serialization/system-text-json/custom-contracts.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @gewarren
* Microsoft Alias: **gewarren**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.