From 861fed2cd17645393541d4aff780c652990aaa4a Mon Sep 17 00:00:00 2001 From: Smaug123 Date: Tue, 6 Feb 2024 20:08:40 +0000 Subject: [PATCH] Add nullness warnings in JsonParse --- xml/System.Text.Json.Nodes/JsonNode.xml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xml/System.Text.Json.Nodes/JsonNode.xml b/xml/System.Text.Json.Nodes/JsonNode.xml index 0e813003e7e..e23a63cb0a1 100644 --- a/xml/System.Text.Json.Nodes/JsonNode.xml +++ b/xml/System.Text.Json.Nodes/JsonNode.xml @@ -2538,7 +2538,7 @@ The underlying value of a after deserial The reader to read. Options to control the behavior. Parses one JSON value (including objects or arrays) from the provided reader. - The from the reader. + The from the reader, or null if the input represents the null JSON value. Options to control the node behavior after parsing. Options to control the document behavior during parsing. Parses a as UTF-8-encoded data representing a single JSON value into a . The Stream will be read to completion. - A representation of the JSON value. + A representation of the JSON value, or null if the input represents the null JSON value. To be added. does not represent a valid single JSON value. @@ -2620,7 +2620,7 @@ This method makes a copy of the data the reader acted on, so there is no caller Options to control the node behavior after parsing. Options to control the document behavior during parsing. Parses text representing a single JSON value. - A representation of the JSON value. + A representation of the JSON value, or null if the input represents the null JSON value. To be added. does not represent a valid single JSON value. @@ -2659,7 +2659,7 @@ This method makes a copy of the data the reader acted on, so there is no caller Options to control the node behavior after parsing. Options to control the document behavior during parsing. Parses text representing a single JSON value. - A representation of the JSON value. + A representation of the JSON value, or null if the input represents the null JSON value. To be added. is . @@ -2699,7 +2699,7 @@ This method makes a copy of the data the reader acted on, so there is no caller Options to control the document behavior during parsing. The token to monitor for cancellation requests. Parses a as UTF-8 encoded data representing a single JSON value into a . The stream will be read to completion. - A to produce a representation of the JSON value. + A to produce either a representation of the JSON value, or null if the input represents the null JSON value. To be added. does not represent a valid single JSON value. @@ -2812,7 +2812,7 @@ The current node is returned if it is a root. Options to control the serialization behavior. Converts the current instance to string in JSON format. JSON representation of current instance. - To be added. + Note that does not round-trip with this function, because of its behavior on the JSON null value. @@ -2876,3 +2876,4 @@ The current node is returned if it is a root. +