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: src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.Raw.cs
+98-26Lines changed: 98 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -8,26 +8,93 @@ namespace System.Text.Json
8
8
publicsealedpartialclassUtf8JsonWriter
9
9
{
10
10
/// <summary>
11
-
/// Writes the input as JSON content.
11
+
/// Writes the input as JSON content. It is expected that the input content is a single complete JSON value.
12
12
/// </summary>
13
13
/// <param name="json">The raw JSON content to write.</param>
14
-
/// <param name="skipInputValidation">Whether to skip validation of the input JSON content.</param>
14
+
/// <param name="skipInputValidation">Whether to validate if the input is an RFC 8259-compliant JSON payload.</param>
15
+
/// <exception cref="ArgumentNullException">Thrown if <paramref name="json"/> is <see langword="null"/>.</exception>
16
+
/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than 715,827,882.</exception>
17
+
/// <exception cref="JsonException">Thrown if <paramref name="skipInputValidation"/> is <see langword="false"/>, and the input is not RFC 8259-compliant.</exception>
18
+
/// <remarks>
19
+
/// When writing untrused JSON values, do not set <paramref name="skipInputValidation"/> to <see langword="true"/> as this can result in invalid JSON
20
+
/// being written, and/or the overall payload being written to the writer instance being invalid.
21
+
///
22
+
/// When using this method, the input content will be written to the writer destination as-is, unless validation fails.
23
+
///
24
+
/// The <see cref="JsonWriterOptions.SkipValidation"/> value for the writer instance is honored when using this method.
25
+
///
26
+
/// The <see cref="JsonWriterOptions.Indented"/> and <see cref="JsonWriterOptions.Encoder"/> values for the writer instance are not applied when using this method.
/// Writes the input as JSON content. It is expected that the input content is a single complete JSON value.
27
45
/// </summary>
28
46
/// <param name="json">The raw JSON content to write.</param>
29
-
/// <param name="skipInputValidation">Whether to skip validation of the input JSON content.</param>
47
+
/// <param name="skipInputValidation">Whether to validate if the input is an RFC 8259-compliant JSON payload.</param>
48
+
/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than 715,827,882.</exception>
49
+
/// <exception cref="JsonException">Thrown if <paramref name="skipInputValidation"/> is <see langword="false"/>, and the input is not RFC 8259-compliant.</exception>
50
+
/// <remarks>
51
+
/// When writing untrused JSON values, do not set <paramref name="skipInputValidation"/> to <see langword="true"/> as this can result in invalid JSON
52
+
/// being written, and/or the overall payload being written to the writer instance being invalid.
53
+
///
54
+
/// When using this method, the input content will be written to the writer destination as-is, unless validation fails.
55
+
///
56
+
/// The <see cref="JsonWriterOptions.SkipValidation"/> value for the writer instance is honored when using this method.
57
+
///
58
+
/// The <see cref="JsonWriterOptions.Indented"/> and <see cref="JsonWriterOptions.Encoder"/> values for the writer instance are not applied when using this method.
/// Writes the input as JSON content. It is expected that the input content is a single complete JSON value.
72
+
/// </summary>
73
+
/// <param name="utf8Json">The raw JSON content to write.</param>
74
+
/// <param name="skipInputValidation">Whether to validate if the input is an RFC 8259-compliant JSON payload.</param>
75
+
/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than 715,827,882.</exception>
76
+
/// <exception cref="JsonException">Thrown if <paramref name="skipInputValidation"/> is <see langword="false"/>, and the input is not RFC 8259-compliant.</exception>
77
+
/// <remarks>
78
+
/// When writing untrused JSON values, do not set <paramref name="skipInputValidation"/> to <see langword="true"/> as this can result in invalid JSON
79
+
/// being written, and/or the overall payload being written to the writer instance being invalid.
80
+
///
81
+
/// When using this method, the input content will be written to the writer destination as-is, unless validation fails.
82
+
///
83
+
/// The <see cref="JsonWriterOptions.SkipValidation"/> value for the writer instance is honored when using this method.
84
+
///
85
+
/// The <see cref="JsonWriterOptions.Indented"/> and <see cref="JsonWriterOptions.Encoder"/> values for the writer instance are not applied when using this method.
0 commit comments