JsonWriterOptions.SkipValidation Property
Definition
Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: JsonWriterOptions.cs
SkipValidation()
Defines whether the Utf8JsonWriter should skip structural validation and allow the user to write invalid JSON, when set to true. If set to false, any attempts to write invalid JSON will result in an InvalidOperationException to be thrown.
public bool SkipValidation { get; set; }
Returns
Remarks
If the JSON being written is known to be correct, then skipping validation (by setting it to true) could improve performance. An example of invalid JSON where the writer will throw (when SkipValidation is set to false) is when you write a value within a JSON object without a property name.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue