You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Text.Json/Utf8JsonReader.xml
+24-8Lines changed: 24 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ This constructor assumes that the entire JSON payload is contained in `jsonData`
122
122
<paramname="jsonData">The UTF-8 encoded JSON text to process.</param>
123
123
<paramname="isFinalBlock">
124
124
<seelangword="true" /> to indicate that the input sequence contains the entire data to process; <seelangword="false" /> to indicate that the input span contains partial data with more data to follow.</param>
125
-
<paramname="state">An object that contains the reader state. If this is the first call to the constructor, pass in a default state. Otherwise, capture the state from the previous instance of the <seecref="T:System.Text.Json.Utf8JsonReader" /> by getting the value of the <seecref="P:System.Text.Json.Utf8JsonReader.CurrentState" /> property and pass that back.</param>
125
+
<paramname="state">An object that contains the reader state. If this is the first call to the constructor, pass the default state; otherwise, pass the value of the <seecref="P:System.Text.Json.Utf8JsonReader.CurrentState" /> property from the previous instance of the <seecref="T:System.Text.Json.Utf8JsonReader" />.</param>
126
126
<summary>Initializes a new instance of the <seecref="T:System.Text.Json.Utf8JsonReader" /> structure that processes a read-only sequence of UTF-8 encoded text and indicates whether the input contains all the text to process.</summary>
127
127
<remarks>
128
128
<formattype="text/markdown"><).
380
+
This method only creates a <xref:System.DateTime> representation of JSON strings that conform to the ISO 8601-1 extended format (see [DateTime and DateTimeOffset support in System.Text.Json](~/docs/standard/datetime/system-text-json-support.md)).
381
381
382
382
]]></format>
383
383
</remarks>
@@ -414,7 +414,7 @@ The entire UTF-8 encoded token value cannot be parsed to a <see cref="System.Dat
414
414
415
415
## Remarks
416
416
417
-
This method only creates a DateTimeOffset representation of JSON strings that conform to the ISO 8601-1 extended format (see [DateTime and DateTimeOffset support in System.Text.Json](~/docs/standard/datetime/system-text-json-support.md)).
417
+
This method only creates a <xref:System.DateTimeOffset> representation of JSON strings that conform to the ISO 8601-1 extended format (see [DateTime and DateTimeOffset support in System.Text.Json](~/docs/standard/datetime/system-text-json-support.md)).
418
418
419
419
]]></format>
420
420
</remarks>
@@ -1073,7 +1073,15 @@ For comments, this value points to before the first comment delimiter (that is,
1073
1073
<summary>Tries to parse the current JSON token value from the source as a <seecref="T:System.DateTime" /> and returns a value that indicates whether the operation succeeded. </summary>
1074
1074
<returns>
1075
1075
<seelangword="true" /> if the entire UTF-8 encoded token value can be successfully parsed to a <seecref="T:System.DateTime" /> value; otherwise, <seelangword="false" />.</returns>
1076
-
<remarks>This method only creates a DateTime representation of JSON strings that conform to the ISO 8601-1 extended format (see [DateTime and DateTimeOffset support in System.Text.Json](~/docs/standard/datetime/system-text-json-support.md)).</remarks>
1076
+
<remarks>
1077
+
<formattype="text/markdown"><).
1082
+
1083
+
]]></format>
1084
+
</remarks>
1077
1085
<exceptioncref="T:System.InvalidOperationException">The value of the JSON token isn't a <seecref="F:System.Text.Json.JsonTokenType.String" />.</exception>
@@ -1101,7 +1109,15 @@ For comments, this value points to before the first comment delimiter (that is,
1101
1109
<summary>Tries to parse the current JSON token value from the source as a <seecref="T:System.DateTimeOffset" /> and returns a value that indicates whether the operation succeeded.</summary>
1102
1110
<returns>
1103
1111
<seelangword="true" /> if the entire UTF-8 encoded token value can be successfully parsed to a <seecref="T:System.DateTimeOffset" /> value; otherwise, <seelangword="false" />.</returns>
1104
-
<remarks>This method only creates a DateTimeOffset representation of JSON strings that conform to the ISO 8601-1 extended format (see [DateTime and DateTimeOffset support in System.Text.Json](~/docs/standard/datetime/system-text-json-support.md)).</remarks>
1112
+
<remarks>
1113
+
<formattype="text/markdown"><).
1118
+
1119
+
]]></format>
1120
+
</remarks>
1105
1121
<exceptioncref="T:System.InvalidOperationException">The value of the JSON token isn't a <seecref="F:System.Text.Json.JsonTokenType.String" />.</exception>
@@ -1521,7 +1537,7 @@ Otherwise, the token value must be accessed from <xref:System.Text.Json.Utf8Json
1521
1537
There is no guarantee that this property will always contain well-formed data. If the input JSON passed in to the `Utf8JsonReader` contains invalid UTF-8 bytes within JSON string tokens, this property will return back those invalid UTF-8 bytes as is.
1522
1538
Therefore, if the input is untrusted or not previously validated, call <xref:System.Text.Json.Utf8JsonReader.GetString> to get the JSON string token.
1523
1539
1524
-
Since this property returns the raw bytes, avoid using it for text comparison. Instead call <xref:System.Text.Json.Utf8JsonReader.ValueTextEquals%2A> which will unescape the text if necessary.
1540
+
Since this property returns the raw bytes, avoid using it for text comparison. Instead call <xref:System.Text.Json.Utf8JsonReader.ValueTextEquals%2A>, which unescapes the text if necessary.
1525
1541
1526
1542
]]></format>
1527
1543
</remarks>
@@ -1564,7 +1580,7 @@ Otherwise, the token value must be accessed from <xref:System.Text.Json.Utf8Json
1564
1580
There is no guarantee that this property will always contain well-formed data. If the input JSON passed in to the `Utf8JsonReader` contains invalid UTF-8 bytes within JSON string tokens, this property will return back those invalid UTF-8 bytes as is.
1565
1581
Therefore, if the input is untrusted or not previously validated, call <xref:System.Text.Json.Utf8JsonReader.GetString> to get the JSON string token.
1566
1582
1567
-
Since this property returns the raw bytes, avoid using it for text comparison. Instead call <xref:System.Text.Json.Utf8JsonReader.ValueTextEquals%2A> which will unescape the text if necessary.
1583
+
Since this property returns the raw bytes, avoid using it for text comparison. Instead call <xref:System.Text.Json.Utf8JsonReader.ValueTextEquals%2A> which unescapes the text if necessary.
0 commit comments