diff --git a/src/libraries/Fuzzing/DotnetFuzzing/Fuzzers/Utf8JsonWriterFuzzer.cs b/src/libraries/Fuzzing/DotnetFuzzing/Fuzzers/Utf8JsonWriterFuzzer.cs index 5600ce7c357a00..59e6c4b5a31368 100644 --- a/src/libraries/Fuzzing/DotnetFuzzing/Fuzzers/Utf8JsonWriterFuzzer.cs +++ b/src/libraries/Fuzzing/DotnetFuzzing/Fuzzers/Utf8JsonWriterFuzzer.cs @@ -119,7 +119,7 @@ public void FuzzTarget(ReadOnlySpan bytes) } // Additional test for mixing UTF-8 and UTF-16 encoding. The alignment math is easier in UTF-16 mode so just run it for that. - if (encoding == Utf16EncodingFlag) + if (encoding == Utf16EncodingFlag && !options.SkipValidation) { Array.Clear(expectedBuffer); diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.StringSegment.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.StringSegment.cs index 1016a9f76ff25e..f5220c068d221a 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.StringSegment.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.WriteValues.StringSegment.cs @@ -18,7 +18,7 @@ public sealed partial class Utf8JsonWriter /// Thrown when the specified value is too large. /// /// - /// Thrown if this would result in invalid JSON being written (while validation is enabled) or + /// Thrown when validation is enabled if this would result in invalid JSON being written or /// if the previously written segment (if any) was not written with this same overload. /// /// @@ -186,7 +186,7 @@ private void WriteStringSegmentData(ReadOnlySpan escapedValue) /// Thrown when the specified value is too large. /// /// - /// Thrown if this would result in invalid JSON being written (while validation is enabled) or + /// Thrown when validation is enabled if this would result in invalid JSON being written or /// if the previously written segment (if any) was not written with this same overload. /// /// @@ -353,7 +353,7 @@ private void WriteStringSegmentData(ReadOnlySpan escapedValue) /// Thrown when the specified value is too large. /// /// - /// Thrown if this would result in invalid JSON being written (while validation is enabled) or + /// Thrown when validation is enabled if this would result in invalid JSON being written or /// if the previously written segment (if any) was not written with this same overload. /// public void WriteBase64StringSegment(ReadOnlySpan value, bool isFinalSegment)