diff --git a/xml/System.Text.Json/JsonSerializer.xml b/xml/System.Text.Json/JsonSerializer.xml index 3b3bfc29204..72955df3727 100644 --- a/xml/System.Text.Json/JsonSerializer.xml +++ b/xml/System.Text.Json/JsonSerializer.xml @@ -14,7 +14,7 @@ - To be added. + Provides functionality to serialize objects or value types to JSON and to deserialize JSON into objects or value types. To be added. @@ -38,12 +38,14 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The JSON text to parse. + The type of the object to convert to and return. + Options to control the behavior during parsing. + Parses the UTF-8 encoded text representing a single JSON value into an instance of a specified type. + A representation of the JSON value. To be added. + is . + The JSON is invalid, is not compatible with the JSON, or when there is remaining data in the Stream. @@ -66,12 +68,23 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The JSON text to parse. + The type of the object to convert to and return. + Options to control the behavior during parsing. + Parses the text representing a single JSON value into an instance of a specified type. + A representation of the JSON value. + + is not as efficient as using the +UTF-8 methods since the implementation natively uses UTF-8. + + ]]> + + or is . + The JSON is invalid, the is not compatible with the JSON, or when there is remaining data in the Stream. @@ -94,12 +107,28 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The reader to read. + The type of the object to convert to and return. + Options to control the serializer behavior during reading. + Reads one JSON value (including objects or arrays) from the provided reader and converts it into an instance of a specified type. + A representation of the JSON value. + + property of `reader` is or , the reader will be advanced by one call to to determine the start of the value. + +Upon completion of this method, `reader` will be positioned at the final token in the JSON value. If an exception is thrown, the reader is reset to the state it was in when the method was called. + +This method makes a copy of the data the reader acted on, so there is no caller requirement to maintain data integrity beyond the return of this method. + +The used to create the instance of the take precedence over the when they conflict. Hence, , , and are used while reading. + + ]]> + + is . + The JSON is invalid, is not compatible with the JSON, or a value could not be read from the reader. @@ -124,12 +153,21 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The target type of the UTF-8 encoded text. + The JSON text to parse. + Options to control the behavior during parsing. + Parses the UTF-8 encoded text representing a single JSON value into an instance of the type specified by a generic type parameter. + A representation of the JSON value. To be added. + The JSON is invalid. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the stream. @@ -154,12 +192,29 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The target type of the JSON value. + The JSON text to parse. + Options to control the behavior during parsing. + Parses the text representing a single JSON value into an instance of the type specified by a generic type parameter. + A representation of the JSON value. + + is not as efficient as using the UTF-8 methods since the implementation natively uses UTF-8. + ]]> + + is . + The JSON is invalid. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the stream. @@ -184,12 +239,36 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The target type of the JSON value. + The reader to read. + Options to control serializer behavior during reading. + Reads one JSON value (including objects or arrays) from the provided reader into an instance of the type specified by a generic type parameter. + A representation of the JSON value. + + property of `reader` is or , the reader will be advanced by one call to to determine the start of the value. + +Upon completion of this method, `reader` will be positioned at the final token in the JSON value. If an exception is thrown, the reader is reset to the state it was in when the method was called. + +This method makes a copy of the data the reader acted on, so there is no caller requirement to maintain data integrity beyond the return of this method. + +The used to create the instance of the take precedence over the when they conflict. Hence, , , and are used while reading. + + ]]> + + The JSON is invalid. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the stream. + uses unsupported options. @@ -212,13 +291,23 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The JSON data to parse. + The type of the object to convert to and return. + Options to control the behavior during reading. + A cancellation token that may be used to cancel the read operation. + Asynchronously reads the UTF-8 encoded text representing a single JSON value into an instance of a specified type. The stream will be read to completion. + A representation of the JSON value. To be added. + or is . + The JSON is invalid. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the stream. @@ -243,13 +332,22 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The target type of the JSON value. + The JSON data to parse. + Options to control the behavior during reading. + A token that may be used to cancel the read operation. + Asynchronously reads the UTF-8 encoded text representing a single JSON value into an instance of a type specified by a generic type parameter. The stream will be read to completion. + A representation of the JSON value. To be added. + The JSON is invalid. + +-or- + + is not compatible with the JSON. + +-or- + +There is remaining data in the stream. @@ -272,12 +370,20 @@ - To be added. - 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 value of a specified type into a . + The string representation of the value. + + is not as efficient as using UTF-8 encoding since the implementation internally uses UTF-8. See also and . + + ]]> + @@ -301,11 +407,11 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The JSON writer. + The value to convert and write. + The type of . + Options to control serialization behavior. + Writes one JSON value (including objects or arrays) of a specified type to the provided writer. To be added. @@ -331,12 +437,20 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The type of the value to serialize. + The value to convert. + Options to control serialization behavior. + Converts the value of a type specified by a generic type parameter into a . + A string representation of the value. + + is not as efficient as using UTF-8 encoding since the implementation internally uses UTF-8. See also and . + + ]]> + @@ -362,11 +476,11 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The type of the value to serialize. + A JSON writer. + The value to convert and write. + Options to control serialization behavior. + Writes one JSON value (including objects or arrays) of a type specified by a generic type parameter to the provided writer. To be added. @@ -391,13 +505,13 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The UTF-8 stream to write to. + The value to convert. + The type of the value to convert. + Options to control serialization behavior. + A token that may be used to cancel the write operation. + Asynchronously converts the value of a specified type to UTF-8 encoded JSON text and writes it to the specified stream. + A task that represents the asynchronous write operation. To be added. @@ -424,13 +538,13 @@ - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The type of the value to serialize. + The UTF-8 stream to write to. + The value to convert. + Options to control serialization behavior. + A token that may be used to cancel the write operation. + Asynchronously converts a value of a type specified by a generic type parametaer to UTF-8 encoded JSON text and writes it to a stream. + A task that represents the asynchronous write operation. To be added. @@ -454,11 +568,11 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The value to convert. + The type of the value to convert. + Options to control the conversion behavior. + Converts a value of the specified type into a UTF8-encoded byte array. + A UTF-8 representation of the value. To be added. @@ -484,13 +598,13 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The type of the value. + The value to convert. + Options to control the conversion behavior. + Converts the value of a type specifed by a generic type parameter into a UTF8-encoded byte array. + A UTF-8 representation of the value. To be added. - \ No newline at end of file +