Skip to content

Commit 0f86bea

Browse files
authored
Add supported types for STJ article (#43769)
1 parent 4cc4efe commit 0f86bea

File tree

14 files changed

+135
-66
lines changed

14 files changed

+135
-66
lines changed

.openpublishing.redirection.standard.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,10 @@
524524
"source_path_from_root": "/docs/standard/serialization/how-to-determine-if-netstandard-object-is-serializable.md",
525525
"redirect_url": "/dotnet/standard/serialization/binaryformatter-security-guide"
526526
},
527+
{
528+
"source_path_from_root": "/docs/standard/serialization/system-text-json/supported-collection-types.md",
529+
"redirect_url": "/dotnet/standard/serialization/system-text-json/supported-types"
530+
},
527531
{
528532
"source_path_from_root": "/docs/standard/index.yml",
529533
"redirect_url": "/dotnet/fundamentals/"

docs/fundamentals/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,8 @@ items:
769769
href: ../standard/serialization/system-text-json/use-utf8jsonreader.md
770770
- name: Visual Basic support
771771
href: ../standard/serialization/system-text-json/visual-basic-support.md
772-
- name: Supported collection types
773-
href: ../standard/serialization/system-text-json/supported-collection-types.md
772+
- name: Supported types
773+
href: ../standard/serialization/system-text-json/supported-types.md
774774
- name: Advanced
775775
items:
776776
- name: Source generation

docs/standard/serialization/binaryformatter-migration-guide/migrate-to-system-text-json.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ When migrating from BinaryFormatter to `System.Text.Json`, it's crucial to note
3434

3535
- To override the default serialization behavior for a specific type, you can [write custom converters](../system-text-json/converters-how-to.md).
3636

37-
- It supports serialization and deserialization of many collections, but there are limitations. See the [supported collection types](../system-text-json/supported-collection-types.md) documentation for details on which collections are supported for serialization and deserialization.
37+
- It supports serialization and deserialization of many collections, but there are limitations. See the [supported types](../system-text-json/supported-types.md) documentation for details on which types and collections are supported for serialization and deserialization.
3838

39-
- Under [certain conditions](../system-text-json/supported-collection-types.md#custom-collections-with-deserialization-support), it supports serialization and deserialization of custom generic collections.
39+
- Under [certain conditions](../system-text-json/supported-types.md#deserialization-support), it supports serialization and deserialization of custom generic collections.
4040

4141
- Other types [without built-in support](../system-text-json/migrate-from-newtonsoft.md#types-without-built-in-support) are: `DataSet`, `DataTable`, `DBNull`, `TimeZoneInfo`, `Type`, `ValueTuple`. However, you can write a custom converter to support these types.
4242

docs/standard/serialization/system-text-json/converters-how-to.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ The following sections provide converter samples that address some common scenar
206206
* [Support round trip for `Stack` types](#support-round-trip-for-stack-types).
207207
* [Use default system converter](#use-default-system-converter).
208208

209-
For a sample <xref:System.Data.DataTable> converter, see [Supported collection types](supported-collection-types.md#systemdata-namespace).
209+
For a sample <xref:System.Data.DataTable> converter, see [Supported types](supported-types.md#systemdata-namespace).
210210

211211
### Deserialize inferred types to object properties
212212

docs/standard/serialization/system-text-json/how-to.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Supported types include:
7777
* <xref:System.Collections.Specialized>
7878
* <xref:System.Collections.ObjectModel>
7979

80-
For more information, see [Supported collection types in System.Text.Json](supported-collection-types.md).
80+
For more information, see [Supported types in System.Text.Json](supported-types.md).
8181

8282
You can [implement custom converters](converters-how-to.md) to handle additional types or to provide functionality that isn't supported by the built-in converters.
8383

docs/standard/serialization/system-text-json/migrate-from-newtonsoft.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ For more information, see [Preserve references and handle circular references](p
257257

258258
### Dictionary with non-string key
259259

260-
Both `Newtonsoft.Json` and `System.Text.Json` support collections of type `Dictionary<TKey, TValue>`. However, in `System.Text.Json`, `TKey` must be a primitive type, not a custom type. For more information, see [Supported key types](supported-collection-types.md#supported-key-types).
260+
Both `Newtonsoft.Json` and `System.Text.Json` support collections of type `Dictionary<TKey, TValue>`. For information about supported key types, see [Supported key types](supported-types.md#supported-key-types).
261261

262262
> [!CAUTION]
263263
> Deserializing to a `Dictionary<TKey, TValue>` where `TKey` is typed as anything other than `string` could introduce a security vulnerability in the consuming application. For more information, see [dotnet/runtime#4761](https://github.com/dotnet/runtime/issues/4761).
@@ -266,7 +266,7 @@ Both `Newtonsoft.Json` and `System.Text.Json` support collections of type `Dicti
266266

267267
<xref:System.Text.Json?displayProperty=fullName> doesn't provide built-in support for the following types:
268268

269-
* <xref:System.Data.DataTable> and related types (for more information, see [Supported collection types](supported-collection-types.md#systemdata-namespace))
269+
* <xref:System.Data.DataTable> and related types (for more information, see [Supported types](supported-types.md#systemdata-namespace))
270270
* <xref:System.Dynamic.ExpandoObject>
271271
* <xref:System.TimeZoneInfo>
272272
* <xref:System.Numerics.BigInteger>

docs/standard/serialization/system-text-json/snippets/supported-collection-types/csharp/Program.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)