From 6a351b6250a91aa3de3076551d1316ab097f0e57 Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Wed, 9 Dec 2020 10:41:15 -0800 Subject: [PATCH 1/2] rfc3339 and add links --- .../system-text-json-character-casing.md | 11 ++++++++-- .../system-text-json-character-encoding.md | 17 ++++++++++++-- .../system-text-json-configure-options.md | 9 +++++++- .../system-text-json-converters-how-to.md | 22 ++++++++++++++----- .../system-text-json-customize-properties.md | 11 ++++++++-- .../system-text-json-handle-overflow.md | 11 ++++++++-- .../serialization/system-text-json-how-to.md | 19 ++++++++++++---- .../system-text-json-ignore-properties.md | 11 ++++++++-- .../system-text-json-immutability.md | 11 ++++++++-- .../system-text-json-invalid-json.md | 11 ++++++++-- ...ext-json-migrate-from-newtonsoft-how-to.md | 20 ++++++++++++----- .../system-text-json-overview.md | 18 +++++++++++---- .../system-text-json-polymorphism.md | 11 ++++++++-- .../system-text-json-preserve-references.md | 9 +++++++- 14 files changed, 155 insertions(+), 36 deletions(-) diff --git a/docs/standard/serialization/system-text-json-character-casing.md b/docs/standard/serialization/system-text-json-character-casing.md index edaa73d4c88ee..118907ea41cf6 100644 --- a/docs/standard/serialization/system-text-json-character-casing.md +++ b/docs/standard/serialization/system-text-json-character-casing.md @@ -38,12 +38,19 @@ Here's example JSON with camel case property names. It can be deserialized into ## See also * [System.Text.Json overview](system-text-json-overview.md) -* [Instantiate JsonSerializerOptions](system-text-json-configure-options.md) +* [How to serialize and deserialize JSON](system-text-json-how-to.md) +* [Instantiate JsonSerializerOptions instances](system-text-json-configure-options.md) * [Customize property names and values](system-text-json-customize-properties.md) * [Ignore properties](system-text-json-ignore-properties.md) * [Allow invalid JSON](system-text-json-invalid-json.md) * [Handle overflow JSON](system-text-json-handle-overflow.md) -* [Preserve circular references](system-text-json-preserve-references.md) +* [Preserve references](system-text-json-preserve-references.md) * [Immutable types and non-public accessors](system-text-json-immutability.md) * [Polymorphic serialization](system-text-json-polymorphism.md) +* [Migrate from Newtonsoft.Json to System.Text.Json](system-text-json-migrate-from-newtonsoft-how-to.md) +* [Customize character encoding](system-text-json-character-encoding.md) +* [Write custom serializers and deserializers](write-custom-serializer-deserializer.md) +* [Write custom converters for JSON serialization](system-text-json-converters-how-to.md) +* [DateTime and DateTimeOffset support](../datetime/system-text-json-support.md) * [System.Text.Json API reference](xref:System.Text.Json) +* [System.Text.Json.Serialization API reference](xref:System.Text.Json.Serialization) diff --git a/docs/standard/serialization/system-text-json-character-encoding.md b/docs/standard/serialization/system-text-json-character-encoding.md index e5da421ea66e2..7bc1caa10d650 100644 --- a/docs/standard/serialization/system-text-json-character-encoding.md +++ b/docs/standard/serialization/system-text-json-character-encoding.md @@ -79,6 +79,19 @@ To minimize escaping you can use +* [System.Text.Json.Serialization API reference](xref:System.Text.Json.Serialization) diff --git a/docs/standard/serialization/system-text-json-ignore-properties.md b/docs/standard/serialization/system-text-json-ignore-properties.md index 28877a9a06e36..f785cac3433c6 100644 --- a/docs/standard/serialization/system-text-json-ignore-properties.md +++ b/docs/standard/serialization/system-text-json-ignore-properties.md @@ -130,12 +130,19 @@ There is no built-in way to prevent serialization of properties with value type ## See also * [System.Text.Json overview](system-text-json-overview.md) -* [Instantiate JsonSerializerOptions](system-text-json-configure-options.md) +* [How to serialize and deserialize JSON](system-text-json-how-to.md) +* [Instantiate JsonSerializerOptions instances](system-text-json-configure-options.md) * [Enable case-insensitive matching](system-text-json-character-casing.md) * [Customize property names and values](system-text-json-customize-properties.md) * [Allow invalid JSON](system-text-json-invalid-json.md) * [Handle overflow JSON](system-text-json-handle-overflow.md) -* [Preserve circular references](system-text-json-preserve-references.md) +* [Preserve references](system-text-json-preserve-references.md) * [Immutable types and non-public accessors](system-text-json-immutability.md) * [Polymorphic serialization](system-text-json-polymorphism.md) +* [Migrate from Newtonsoft.Json to System.Text.Json](system-text-json-migrate-from-newtonsoft-how-to.md) +* [Customize character encoding](system-text-json-character-encoding.md) +* [Write custom serializers and deserializers](write-custom-serializer-deserializer.md) +* [Write custom converters for JSON serialization](system-text-json-converters-how-to.md) +* [DateTime and DateTimeOffset support](../datetime/system-text-json-support.md) * [System.Text.Json API reference](xref:System.Text.Json) +* [System.Text.Json.Serialization API reference](xref:System.Text.Json.Serialization) diff --git a/docs/standard/serialization/system-text-json-immutability.md b/docs/standard/serialization/system-text-json-immutability.md index 2c9fa6b9008a9..351e6c44076ab 100644 --- a/docs/standard/serialization/system-text-json-immutability.md +++ b/docs/standard/serialization/system-text-json-immutability.md @@ -48,12 +48,19 @@ Non-public property accessors are not supported in .NET Core 3.1. For more infor ## See also * [System.Text.Json overview](system-text-json-overview.md) -* [Instantiate JsonSerializerOptions](system-text-json-configure-options.md) +* [How to serialize and deserialize JSON](system-text-json-how-to.md) +* [Instantiate JsonSerializerOptions instances](system-text-json-configure-options.md) * [Enable case-insensitive matching](system-text-json-character-casing.md) * [Customize property names and values](system-text-json-customize-properties.md) * [Ignore properties](system-text-json-ignore-properties.md) * [Allow invalid JSON](system-text-json-invalid-json.md) * [Handle overflow JSON](system-text-json-handle-overflow.md) -* [Preserve circular references](system-text-json-preserve-references.md) +* [Preserve references](system-text-json-preserve-references.md) * [Polymorphic serialization](system-text-json-polymorphism.md) +* [Migrate from Newtonsoft.Json to System.Text.Json](system-text-json-migrate-from-newtonsoft-how-to.md) +* [Customize character encoding](system-text-json-character-encoding.md) +* [Write custom serializers and deserializers](write-custom-serializer-deserializer.md) +* [Write custom converters for JSON serialization](system-text-json-converters-how-to.md) +* [DateTime and DateTimeOffset support](../datetime/system-text-json-support.md) * [System.Text.Json API reference](xref:System.Text.Json) +* [System.Text.Json.Serialization API reference](xref:System.Text.Json.Serialization) diff --git a/docs/standard/serialization/system-text-json-invalid-json.md b/docs/standard/serialization/system-text-json-invalid-json.md index d08c36e51327b..4f74064f152fe 100644 --- a/docs/standard/serialization/system-text-json-invalid-json.md +++ b/docs/standard/serialization/system-text-json-invalid-json.md @@ -72,12 +72,19 @@ To allow or write quoted numbers for specific properties, fields, or types, use ## See also * [System.Text.Json overview](system-text-json-overview.md) -* [Instantiate JsonSerializerOptions](system-text-json-configure-options.md) +* [How to serialize and deserialize JSON](system-text-json-how-to.md) +* [Instantiate JsonSerializerOptions instances](system-text-json-configure-options.md) * [Enable case-insensitive matching](system-text-json-character-casing.md) * [Customize property names and values](system-text-json-customize-properties.md) * [Ignore properties](system-text-json-ignore-properties.md) * [Handle overflow JSON](system-text-json-handle-overflow.md) -* [Preserve circular references](system-text-json-preserve-references.md) +* [Preserve references](system-text-json-preserve-references.md) * [Immutable types and non-public accessors](system-text-json-immutability.md) * [Polymorphic serialization](system-text-json-polymorphism.md) +* [Migrate from Newtonsoft.Json to System.Text.Json](system-text-json-migrate-from-newtonsoft-how-to.md) +* [Customize character encoding](system-text-json-character-encoding.md) +* [Write custom serializers and deserializers](write-custom-serializer-deserializer.md) +* [Write custom converters for JSON serialization](system-text-json-converters-how-to.md) +* [DateTime and DateTimeOffset support](../datetime/system-text-json-support.md) * [System.Text.Json API reference](xref:System.Text.Json) +* [System.Text.Json.Serialization API reference](xref:System.Text.Json.Serialization) diff --git a/docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md b/docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md index 3951eb012e577..aec5254cbcca6 100644 --- a/docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md +++ b/docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md @@ -528,7 +528,7 @@ The required properties converter would require additional logic if you need to * The `DateTimeZoneHandling` setting can be used to serialize all `DateTime` values as UTC dates. * The `DateFormatString` setting and `DateTime` converters can be used to customize the format of date strings. -In , the only format that has built-in support is ISO 8601-1:2019 since it's widely adopted, unambiguous, and makes round trips precisely. To use any other format, create a custom converter. For more information, see [DateTime and DateTimeOffset support in System.Text.Json](../datetime/system-text-json-support.md). + supports ISO 8601-1:2019, including the RFC 3339 profile. This format is widely adopted, unambiguous, and makes round trips precisely. To use any other format, create a custom converter. For more information, see [DateTime and DateTimeOffset support in System.Text.Json](../datetime/system-text-json-support.md). ### Callbacks @@ -799,10 +799,20 @@ If you need to continue to use `Newtonsoft.Json` for certain target frameworks, ## Additional resources - * [System.Text.Json overview](system-text-json-overview.md) -* [How to use System.Text.Json](system-text-json-how-to.md) -* [How to write custom converters](system-text-json-converters-how-to.md) -* [DateTime and DateTimeOffset support in System.Text.Json](../datetime/system-text-json-support.md) +* [How to serialize and deserialize JSON](system-text-json-how-to.md) +* [Instantiate JsonSerializerOptions instances](system-text-json-configure-options.md) +* [Enable case-insensitive matching](system-text-json-character-casing.md) +* [Customize property names and values](system-text-json-customize-properties.md) +* [Ignore properties](system-text-json-ignore-properties.md) +* [Allow invalid JSON](system-text-json-invalid-json.md) +* [Handle overflow JSON](system-text-json-handle-overflow.md) +* [Preserve references](system-text-json-preserve-references.md) +* [Immutable types and non-public accessors](system-text-json-immutability.md) +* [Polymorphic serialization](system-text-json-polymorphism.md) +* [Customize character encoding](system-text-json-character-encoding.md) +* [Write custom serializers and deserializers](write-custom-serializer-deserializer.md) +* [Write custom converters for JSON serialization](system-text-json-converters-how-to.md) +* [DateTime and DateTimeOffset support](../datetime/system-text-json-support.md) * [System.Text.Json API reference](xref:System.Text.Json) * [System.Text.Json.Serialization API reference](xref:System.Text.Json.Serialization) diff --git a/docs/standard/serialization/system-text-json-overview.md b/docs/standard/serialization/system-text-json-overview.md index ec34d41b4dbed..53f2cc7aab5e6 100644 --- a/docs/standard/serialization/system-text-json-overview.md +++ b/docs/standard/serialization/system-text-json-overview.md @@ -30,9 +30,19 @@ The library also provides classes for working with an in-memory document object ## Additional resources * [How to use the library](system-text-json-how-to.md) -* [How to migrate from Newtonsoft.Json](system-text-json-migrate-from-newtonsoft-how-to.md) -* [How to write converters](system-text-json-converters-how-to.md) -* [System.Text.Json source code](https://github.com/dotnet/runtime/tree/81bf79fd9aa75305e55abe2f7e9ef3f60624a3a1/src/libraries/System.Text.Json) +* [Instantiate JsonSerializerOptions instances](system-text-json-configure-options.md) +* [Enable case-insensitive matching](system-text-json-character-casing.md) +* [Customize property names and values](system-text-json-customize-properties.md) +* [Ignore properties](system-text-json-ignore-properties.md) +* [Allow invalid JSON](system-text-json-invalid-json.md) +* [Handle overflow JSON](system-text-json-handle-overflow.md) +* [Preserve references](system-text-json-preserve-references.md) +* [Immutable types and non-public accessors](system-text-json-immutability.md) +* [Polymorphic serialization](system-text-json-polymorphism.md) +* [Migrate from Newtonsoft.Json to System.Text.Json](system-text-json-migrate-from-newtonsoft-how-to.md) +* [Customize character encoding](system-text-json-character-encoding.md) +* [Write custom serializers and deserializers](write-custom-serializer-deserializer.md) +* [Write custom converters for JSON serialization](system-text-json-converters-how-to.md) +* [DateTime and DateTimeOffset support](../datetime/system-text-json-support.md) * [System.Text.Json API reference](xref:System.Text.Json) * [System.Text.Json.Serialization API reference](xref:System.Text.Json.Serialization) - diff --git a/docs/standard/serialization/system-text-json-polymorphism.md b/docs/standard/serialization/system-text-json-polymorphism.md index ffb63dae6fdc6..c499222dd3bb0 100644 --- a/docs/standard/serialization/system-text-json-polymorphism.md +++ b/docs/standard/serialization/system-text-json-polymorphism.md @@ -126,12 +126,19 @@ For more information about polymorphic **serialization**, and for information ab ## See also * [System.Text.Json overview](system-text-json-overview.md) -* [Instantiate JsonSerializerOptions](system-text-json-configure-options.md) +* [How to serialize and deserialize JSON](system-text-json-how-to.md) +* [Instantiate JsonSerializerOptions instances](system-text-json-configure-options.md) * [Enable case-insensitive matching](system-text-json-character-casing.md) * [Customize property names and values](system-text-json-customize-properties.md) * [Ignore properties](system-text-json-ignore-properties.md) * [Allow invalid JSON](system-text-json-invalid-json.md) * [Handle overflow JSON](system-text-json-handle-overflow.md) -* [Preserve circular references](system-text-json-preserve-references.md) +* [Preserve references](system-text-json-preserve-references.md) * [Immutable types and non-public accessors](system-text-json-immutability.md) +* [Migrate from Newtonsoft.Json to System.Text.Json](system-text-json-migrate-from-newtonsoft-how-to.md) +* [Customize character encoding](system-text-json-character-encoding.md) +* [Write custom serializers and deserializers](write-custom-serializer-deserializer.md) +* [Write custom converters for JSON serialization](system-text-json-converters-how-to.md) +* [DateTime and DateTimeOffset support](../datetime/system-text-json-support.md) * [System.Text.Json API reference](xref:System.Text.Json) +* [System.Text.Json.Serialization API reference](xref:System.Text.Json.Serialization) diff --git a/docs/standard/serialization/system-text-json-preserve-references.md b/docs/standard/serialization/system-text-json-preserve-references.md index 25a6f3b48cf32..47351ee1f7b66 100644 --- a/docs/standard/serialization/system-text-json-preserve-references.md +++ b/docs/standard/serialization/system-text-json-preserve-references.md @@ -52,7 +52,8 @@ System.Text.Json in .NET Core 3.1 only supports serialization by value and throw ## See also * [System.Text.Json overview](system-text-json-overview.md) -* [Instantiate JsonSerializerOptions](system-text-json-configure-options.md) +* [How to serialize and deserialize JSON](system-text-json-how-to.md) +* [Instantiate JsonSerializerOptions instances](system-text-json-configure-options.md) * [Enable case-insensitive matching](system-text-json-character-casing.md) * [Customize property names and values](system-text-json-customize-properties.md) * [Ignore properties](system-text-json-ignore-properties.md) @@ -60,4 +61,10 @@ System.Text.Json in .NET Core 3.1 only supports serialization by value and throw * [Handle overflow JSON](system-text-json-handle-overflow.md) * [Immutable types and non-public accessors](system-text-json-immutability.md) * [Polymorphic serialization](system-text-json-polymorphism.md) +* [Migrate from Newtonsoft.Json to System.Text.Json](system-text-json-migrate-from-newtonsoft-how-to.md) +* [Customize character encoding](system-text-json-character-encoding.md) +* [Write custom serializers and deserializers](write-custom-serializer-deserializer.md) +* [Write custom converters for JSON serialization](system-text-json-converters-how-to.md) +* [DateTime and DateTimeOffset support](../datetime/system-text-json-support.md) * [System.Text.Json API reference](xref:System.Text.Json) +* [System.Text.Json.Serialization API reference](xref:System.Text.Json.Serialization) From e413108f0425f3195501581cc4f3855abda5768b Mon Sep 17 00:00:00 2001 From: Tom Dykstra Date: Wed, 9 Dec 2020 10:51:41 -0800 Subject: [PATCH 2/2] minor edits --- .../serialization/system-text-json-preserve-references.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/standard/serialization/system-text-json-preserve-references.md b/docs/standard/serialization/system-text-json-preserve-references.md index 47351ee1f7b66..7cd8080fc4f92 100644 --- a/docs/standard/serialization/system-text-json-preserve-references.md +++ b/docs/standard/serialization/system-text-json-preserve-references.md @@ -1,7 +1,7 @@ --- title: How to preserve references with System.Text.Json description: "Learn how to preserve references and handle circular references while serializing to and deserializing from JSON in .NET." -ms.date: 11/30/2020 +ms.date: 12/09/2020 no-loc: [System.Text.Json, Newtonsoft.Json] zone_pivot_groups: dotnet-version helpviewer_keywords: @@ -11,11 +11,7 @@ helpviewer_keywords: - "objects, serializing" --- -# How to handle circular references with System.Text.Json - -In this article, you will learn how to handle circular references with the `System.Text.Json` namespace. - -## Preserve references and handle circular references +# How to preserve references and handle circular references with System.Text.Json ::: zone pivot="dotnet-5-0"