From 6f101fe9c68a2846537505fafa295c769b7d84ab Mon Sep 17 00:00:00 2001 From: carlossanlop Date: Thu, 2 Sep 2021 21:59:21 -0700 Subject: [PATCH 1/3] Port System.Text.Json triple slash to docs --- .../JsonMetadataServices.xml | 11 +- .../JsonObjectInfoValues`1.xml | 16 +- .../JsonParameterInfoValues.xml | 12 +- .../JsonConverter`1.xml | 38 +- xml/System.Text.Json/JsonSerializer.xml | 451 ++++++++++++------ .../Capture.xml | 4 +- 6 files changed, 360 insertions(+), 172 deletions(-) diff --git a/xml/System.Text.Json.Serialization.Metadata/JsonMetadataServices.xml b/xml/System.Text.Json.Serialization.Metadata/JsonMetadataServices.xml index 6f8773d8a18..91681625bbb 100644 --- a/xml/System.Text.Json.Serialization.Metadata/JsonMetadataServices.xml +++ b/xml/System.Text.Json.Serialization.Metadata/JsonMetadataServices.xml @@ -821,12 +821,13 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The type of the class or struct. + The to initialize the metadata with. + Provides serialization metadata about an object type with constructors, properties, and fields. + Creates metadata for a complex class or struct. + A instance representing the class or struct. To be added. + Thrown when or is . diff --git a/xml/System.Text.Json.Serialization.Metadata/JsonObjectInfoValues`1.xml b/xml/System.Text.Json.Serialization.Metadata/JsonObjectInfoValues`1.xml index 61a8a2534b2..c96a25bde89 100644 --- a/xml/System.Text.Json.Serialization.Metadata/JsonObjectInfoValues`1.xml +++ b/xml/System.Text.Json.Serialization.Metadata/JsonObjectInfoValues`1.xml @@ -17,8 +17,8 @@ - To be added. - To be added. + The object type to serialize or deserialize. + Provides serialization metadata about an object type with constructors, properties, and fields. To be added. @@ -55,7 +55,7 @@ System.Func<System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]> - To be added. + Provides a mechanism to initialize metadata for a parameterized constructor of the class or struct to be used when deserializing. To be added. To be added. @@ -76,7 +76,7 @@ System.Text.Json.Serialization.JsonNumberHandling - To be added. + Specifies how number properties and fields should be processed when serializing and deserializing. To be added. To be added. @@ -97,7 +97,7 @@ System.Func<T> - To be added. + Provides a mechanism to create an instance of the class or struct when deserializing, using a parameterless constructor. To be added. To be added. @@ -118,7 +118,7 @@ System.Func<System.Object[],T> - To be added. + Provides a mechanism to create an instance of the class or struct when deserializing, using a parameterized constructor. To be added. To be added. @@ -139,7 +139,7 @@ System.Func<System.Text.Json.Serialization.JsonSerializerContext,System.Text.Json.Serialization.Metadata.JsonPropertyInfo[]> - To be added. + Provides a mechanism to initialize metadata for properties and fields of the class or struct. To be added. To be added. @@ -160,7 +160,7 @@ System.Action<System.Text.Json.Utf8JsonWriter,T> - To be added. + Provides a serialization implementation for instances of the class or struct which assumes options specified by . To be added. To be added. diff --git a/xml/System.Text.Json.Serialization.Metadata/JsonParameterInfoValues.xml b/xml/System.Text.Json.Serialization.Metadata/JsonParameterInfoValues.xml index 47e7f1817ca..01be1af2630 100644 --- a/xml/System.Text.Json.Serialization.Metadata/JsonParameterInfoValues.xml +++ b/xml/System.Text.Json.Serialization.Metadata/JsonParameterInfoValues.xml @@ -14,7 +14,7 @@ - To be added. + Provides information about a constructor parameter required for JSON deserialization. To be added. @@ -51,7 +51,7 @@ System.Object - To be added. + The default value of the parameter. To be added. To be added. @@ -72,7 +72,7 @@ System.Boolean - To be added. + Whether a default value was specified for the parameter. To be added. To be added. @@ -93,7 +93,7 @@ System.String - To be added. + The name of the parameter. To be added. To be added. @@ -114,7 +114,7 @@ System.Type - To be added. + The type of the parameter. To be added. To be added. @@ -135,7 +135,7 @@ System.Int32 - To be added. + The zero-based position of the parameter in the formal parameter list. To be added. To be added. diff --git a/xml/System.Text.Json.Serialization/JsonConverter`1.xml b/xml/System.Text.Json.Serialization/JsonConverter`1.xml index df8285f076f..c9156288dee 100644 --- a/xml/System.Text.Json.Serialization/JsonConverter`1.xml +++ b/xml/System.Text.Json.Serialization/JsonConverter`1.xml @@ -184,12 +184,20 @@ For more information, see [How to write custom converters for JSON serialization - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The to read from. + The being converted. + The being used. + Reads a dictionary key from a JSON property name. + The value that was converted. + + + @@ -254,11 +262,19 @@ For more information, see [How to write custom converters for JSON serialization - To be added. - To be added. - To be added. - To be added. - To be added. + The to write to. + The value to convert. Note that the value of determines if the converter handles values. + The being used. + Writes a dictionary key as a JSON property name. + + + diff --git a/xml/System.Text.Json/JsonSerializer.xml b/xml/System.Text.Json/JsonSerializer.xml index 4e1d5072f7c..debf5c2766a 100644 --- a/xml/System.Text.Json/JsonSerializer.xml +++ b/xml/System.Text.Json/JsonSerializer.xml @@ -255,10 +255,14 @@ Using a UTF-16 span is not as efficient as using the is . The JSON is invalid. - -or- - is not compatible with the JSON. - -or- - There is remaining data in the span beyond a single JSON value. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the span beyond a single JSON value. There is no compatible for or its serializable members. @@ -300,13 +304,19 @@ Using a is not as efficient as using the or is . - -or- - is . + +-or- + + is . The JSON is invalid. - -or- - is not compatible with the JSON. - -or- - There is remaining data in the string beyond a single JSON value. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the string beyond a single JSON value. There is no compatible for or its serializable members. The method of the provided returns for the type to convert. @@ -418,13 +428,19 @@ Using a is not as efficient as using the or is . - -or- - is . + +-or- + + is . The JSON is invalid. - -or- - is not compatible with the JSON. - -or- - There is remaining data in the string beyond a single JSON value. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the string beyond a single JSON value. There is no compatible for or its serializable members. The method of the provided returns for the type to convert. @@ -455,12 +471,17 @@ Using a is not as efficient as using the - To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + The type of the object to convert to and return. + Options to control the behavior during parsing. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + or is . + + is not compatible with the JSON. + There is no compatible for or its serializable members. @@ -484,12 +505,33 @@ Using a is not as efficient as using the - To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + The type of the object to convert to and return. + A metadata provider for serializable types. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is . + +-or- + + is . + +-or- + + is . + The JSON is invalid. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the string beyond a single JSON value. + There is no compatible for or its serializable members. + The method of the provided returns for the type to convert. @@ -518,12 +560,17 @@ Using a is not as efficient as using the - To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + The type of the object to convert to and return. + Options to control the behavior during parsing. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is . + + is not compatible with the JSON. + There is no compatible for or its serializable members. @@ -547,12 +594,29 @@ Using a is not as efficient as using the - To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + The type of the object to convert to and return. + A metadata provider for serializable types. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is . + +-or- + + is . + The JSON is invalid. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the string beyond a single JSON value. + There is no compatible for or its serializable members. + The method of the provided returns for the type to convert. @@ -581,12 +645,15 @@ Using a is not as efficient as using the - To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + The type of the object to convert to and return. + Options to control the behavior during parsing. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is not compatible with the JSON. + There is no compatible for or its serializable members. @@ -610,12 +677,29 @@ Using a is not as efficient as using the - To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + The type of the object to convert to and return. + A metadata provider for serializable types. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is . + +-or- + + is . + The JSON is invalid. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the string beyond a single JSON value. + There is no compatible for or its serializable members. + The method of the provided returns for the type to convert. @@ -973,10 +1057,14 @@ Using a UTF-16 span is not as efficient as using the ]]> The JSON is invalid. - -or- - is not compatible with the JSON. - -or- - There is remaining data in the span beyond a single JSON value. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the span beyond a single JSON value. There is no compatible for or its serializable members. @@ -1020,13 +1108,19 @@ Using a is not as efficient as using the is . - -or- - is . + +-or- + + is . The JSON is invalid. - -or- - is not compatible with the JSON. - -or- - There is remaining data in the string beyond a single JSON value. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the string beyond a single JSON value. There is no compatible for or its serializable members. @@ -1133,13 +1227,19 @@ Using a is not as efficient as using the is . - -or- - is . + +-or- + + is . The JSON is invalid. - -or- - is not compatible with the JSON. - -or- - There is remaining data in the string beyond a single JSON value. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the string beyond a single JSON value. There is no compatible for or its serializable members. @@ -1172,11 +1272,16 @@ Using a is not as efficient as using the To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + Options to control the behavior during parsing. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is . + + is not compatible with the JSON. + There is no compatible for or its serializable members. @@ -1203,11 +1308,20 @@ Using a is not as efficient as using the To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + Metadata about the type to convert. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is . + +-or- + + is . + + is not compatible with the JSON. + There is no compatible for or its serializable members. @@ -1239,11 +1353,14 @@ Using a is not as efficient as using the To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + Options to control the behavior during parsing. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is not compatible with the JSON. + There is no compatible for or its serializable members. @@ -1270,11 +1387,16 @@ Using a is not as efficient as using the To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + Metadata about the type to convert. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is . + + is not compatible with the JSON. + There is no compatible for or its serializable members. @@ -1306,11 +1428,14 @@ Using a is not as efficient as using the To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + Options to control the behavior during parsing. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is not compatible with the JSON. + There is no compatible for or its serializable members. @@ -1337,11 +1462,16 @@ Using a is not as efficient as using the To be added. - To be added. - To be added. - To be added. - To be added. + The to convert. + Metadata about the type to convert. + Converts the representing a single JSON value into a . + A representation of the JSON value. To be added. + + is . + + is not compatible with the JSON. + There is no compatible for or its serializable members. @@ -2480,12 +2610,18 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa - To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + The type of the to convert. + Options to control the conversion behavior. + Converts the provided value into a . + A representation of the value. To be added. + + is not compatible with . + + is . + + There is no compatible for or its serializable members. @@ -2509,12 +2645,16 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa - To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + The type of the to convert. + A metadata provider for serializable types. + Converts the provided value into a . + A representation of the value. To be added. + There is no compatible for or its serializable members. + The method of the provided returns for the type to convert. + + or is . @@ -2546,11 +2686,12 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + Options to control the conversion behavior. + Converts the provided value into a . + A representation of the JSON value. To be added. + There is no compatible for or its serializable members. @@ -2577,11 +2718,14 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + Metadata about the type to convert. + Converts the provided value into a . + A representation of the value. To be added. + There is no compatible for or its serializable members. + + is . @@ -2610,12 +2754,18 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa - To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + The type of the to convert. + Options to control the conversion behavior. + Converts the provided value into a . + A representation of the value. To be added. + + is not compatible with . + + + is . + There is no compatible for or its serializable members. @@ -2639,12 +2789,16 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa - To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + The type of the to convert. + A metadata provider for serializable types. + Converts the provided value into a . + A representation of the value. To be added. + There is no compatible for or its serializable members. + The method of the provided returns for the type to convert. + + or is . @@ -2676,11 +2830,12 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + Options to control the conversion behavior. + Converts the provided value into a . + A representation of the JSON value. To be added. + There is no compatible for or its serializable members. @@ -2707,11 +2862,14 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + Metadata about the type to convert. + Converts the provided value into a . + A representation of the value. To be added. + There is no compatible for or its serializable members. + + is . @@ -2740,12 +2898,17 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa - To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + The type of the to convert. + Options to control the conversion behavior. + Converts the provided value into a . + A representation of the value. To be added. + + is not compatible with . + + is . + There is no compatible for or its serializable members. @@ -2769,12 +2932,16 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa - To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + The type of the to convert. + A metadata provider for serializable types. + Converts the provided value into a . + A representation of the value. To be added. + There is no compatible for or its serializable members. + The method of the provided returns for the type to convert. + + or is . @@ -2806,11 +2973,12 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + Options to control the conversion behavior. + Converts the provided value into a . + A representation of the JSON value. To be added. + There is no compatible for or its serializable members. @@ -2837,11 +3005,14 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + Metadata about the type to convert. + Converts the provided value into a . + A representation of the value. To be added. + There is no compatible for or its serializable members. + + is . diff --git a/xml/System.Text.RegularExpressions/Capture.xml b/xml/System.Text.RegularExpressions/Capture.xml index 6f5d8de87b1..04bcbfa785b 100644 --- a/xml/System.Text.RegularExpressions/Capture.xml +++ b/xml/System.Text.RegularExpressions/Capture.xml @@ -335,8 +335,8 @@ System.ReadOnlySpan<System.Char> - To be added. - To be added. + Gets the captured span from the input string. + The span that is captured by the match. To be added. From 04e224319bfa184026ec03cc85694da59c391d60 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com> Date: Thu, 2 Sep 2021 23:24:29 -0700 Subject: [PATCH 2/3] fix warnings --- xml/System.Text.Json.Serialization/JsonConverter`1.xml | 2 +- xml/System.Text.Json/JsonSerializer.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xml/System.Text.Json.Serialization/JsonConverter`1.xml b/xml/System.Text.Json.Serialization/JsonConverter`1.xml index c9156288dee..9217b647ce0 100644 --- a/xml/System.Text.Json.Serialization/JsonConverter`1.xml +++ b/xml/System.Text.Json.Serialization/JsonConverter`1.xml @@ -263,7 +263,7 @@ For more information, see [How to write custom converters for JSON serialization The to write to. - The value to convert. Note that the value of determines if the converter handles values. + The value to convert. Note that the value of determines if the converter handles values. The being used. Writes a dictionary key as a JSON property name. diff --git a/xml/System.Text.Json/JsonSerializer.xml b/xml/System.Text.Json/JsonSerializer.xml index debf5c2766a..c1289d8a61b 100644 --- a/xml/System.Text.Json/JsonSerializer.xml +++ b/xml/System.Text.Json/JsonSerializer.xml @@ -2762,10 +2762,10 @@ For more information, see [How to serialize and deserialize JSON](/dotnet/standa To be added. is not compatible with . - - + is . - There is no compatible for or its serializable members. + + There is no compatible for or its serializable members. From f2f4e78ef48820c01583b9814cadc50c946cc58e Mon Sep 17 00:00:00 2001 From: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com> Date: Wed, 8 Sep 2021 12:31:41 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- .../JsonMetadataServices.xml | 3 ++- .../JsonObjectInfoValues`1.xml | 10 +++++----- .../JsonParameterInfoValues.xml | 10 +++++----- .../JsonConverter`1.xml | 12 ++++++------ 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/xml/System.Text.Json.Serialization.Metadata/JsonMetadataServices.xml b/xml/System.Text.Json.Serialization.Metadata/JsonMetadataServices.xml index 91681625bbb..0a81589ce4b 100644 --- a/xml/System.Text.Json.Serialization.Metadata/JsonMetadataServices.xml +++ b/xml/System.Text.Json.Serialization.Metadata/JsonMetadataServices.xml @@ -827,7 +827,8 @@ Creates metadata for a complex class or struct. A instance representing the class or struct. To be added. - Thrown when or is . + + or is . diff --git a/xml/System.Text.Json.Serialization.Metadata/JsonObjectInfoValues`1.xml b/xml/System.Text.Json.Serialization.Metadata/JsonObjectInfoValues`1.xml index c96a25bde89..e1b53580340 100644 --- a/xml/System.Text.Json.Serialization.Metadata/JsonObjectInfoValues`1.xml +++ b/xml/System.Text.Json.Serialization.Metadata/JsonObjectInfoValues`1.xml @@ -76,7 +76,7 @@ System.Text.Json.Serialization.JsonNumberHandling - Specifies how number properties and fields should be processed when serializing and deserializing. + Gets or sets an object that specifies how number properties and fields should be processed when serializing and deserializing. To be added. To be added. @@ -97,7 +97,7 @@ System.Func<T> - Provides a mechanism to create an instance of the class or struct when deserializing, using a parameterless constructor. + Gets or sets a mechanism to create an instance of the class or struct using a parameterless constructor during deserialization. To be added. To be added. @@ -118,7 +118,7 @@ System.Func<System.Object[],T> - Provides a mechanism to create an instance of the class or struct when deserializing, using a parameterized constructor. + Gets or sets a mechanism to create an instance of the class or struct using a parameterized constructor during deserialization. To be added. To be added. @@ -139,7 +139,7 @@ System.Func<System.Text.Json.Serialization.JsonSerializerContext,System.Text.Json.Serialization.Metadata.JsonPropertyInfo[]> - Provides a mechanism to initialize metadata for properties and fields of the class or struct. + Gets or sets a mechanism to initialize metadata for properties and fields of the class or struct. To be added. To be added. @@ -160,7 +160,7 @@ System.Action<System.Text.Json.Utf8JsonWriter,T> - Provides a serialization implementation for instances of the class or struct which assumes options specified by . + Gets or sets a serialization implementation for instances of the class or struct that assumes options specified by . To be added. To be added. diff --git a/xml/System.Text.Json.Serialization.Metadata/JsonParameterInfoValues.xml b/xml/System.Text.Json.Serialization.Metadata/JsonParameterInfoValues.xml index 01be1af2630..bcb9a1c9542 100644 --- a/xml/System.Text.Json.Serialization.Metadata/JsonParameterInfoValues.xml +++ b/xml/System.Text.Json.Serialization.Metadata/JsonParameterInfoValues.xml @@ -51,7 +51,7 @@ System.Object - The default value of the parameter. + Gets or sets the default value of the parameter. To be added. To be added. @@ -72,7 +72,7 @@ System.Boolean - Whether a default value was specified for the parameter. + Gets or sets a value that specifies whether a default value was specified for the parameter. To be added. To be added. @@ -93,7 +93,7 @@ System.String - The name of the parameter. + Gets or sets the name of the parameter. To be added. To be added. @@ -114,7 +114,7 @@ System.Type - The type of the parameter. + Gets or sets the type of the parameter. To be added. To be added. @@ -135,7 +135,7 @@ System.Int32 - The zero-based position of the parameter in the formal parameter list. + Gets or sets the zero-based position of the parameter in the formal parameter list. To be added. To be added. diff --git a/xml/System.Text.Json.Serialization/JsonConverter`1.xml b/xml/System.Text.Json.Serialization/JsonConverter`1.xml index 9217b647ce0..69a97440a78 100644 --- a/xml/System.Text.Json.Serialization/JsonConverter`1.xml +++ b/xml/System.Text.Json.Serialization/JsonConverter`1.xml @@ -185,8 +185,8 @@ For more information, see [How to write custom converters for JSON serialization The to read from. - The being converted. - The being used. + The type to convert. + The options to use when reading the value. Reads a dictionary key from a JSON property name. The value that was converted. @@ -194,7 +194,7 @@ For more information, see [How to write custom converters for JSON serialization ## Remarks -Method should be overridden in custom converters of types used in deserialized dictionary keys. +This method should be overridden in custom converters of types used in deserialized dictionary keys. ]]> @@ -263,15 +263,15 @@ For more information, see [How to write custom converters for JSON serialization The to write to. - The value to convert. Note that the value of determines if the converter handles values. - The being used. + The value to convert. The value of determines if the converter handles values. + The options to use when writing the value. Writes a dictionary key as a JSON property name.