Corvus.Text.Json.Validator 5.7.9

dotnet add package Corvus.Text.Json.Validator --version 5.7.9
                    
NuGet\Install-Package Corvus.Text.Json.Validator -Version 5.7.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Corvus.Text.Json.Validator" Version="5.7.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Corvus.Text.Json.Validator" Version="5.7.9" />
                    
Directory.Packages.props
<PackageReference Include="Corvus.Text.Json.Validator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Corvus.Text.Json.Validator --version 5.7.9
                    
#r "nuget: Corvus.Text.Json.Validator, 5.7.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Corvus.Text.Json.Validator@5.7.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Corvus.Text.Json.Validator&version=5.7.9
                    
Install as a Cake Addin
#tool nuget:?package=Corvus.Text.Json.Validator&version=5.7.9
                    
Install as a Cake Tool

Corvus.Text.Json.Validator

Load and validate JSON documents against JSON Schema at runtime. Schemas are compiled into an in-memory evaluator by Corvus.Text.Json.RuntimeEvaluator: no code generation, no Roslyn, and a cold start measured in milliseconds.

Ideal for schema registries, configuration validation, and user-supplied schemas where the schema is not known at build time.

Installation

dotnet add package Corvus.Text.Json.Validator

Usage

using Corvus.Text.Json.Validator;

// Load a schema
string schema = """
    {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "required": ["name"],
        "properties": {
            "name": { "type": "string", "minLength": 1 }
        }
    }
    """;

// Compile and cache the schema
JsonSchema validator = JsonSchema.FromText(schema);

// Validate JSON documents
string json = """{"name": "Alice"}""";
bool isValid = validator.Validate(json);

Console.WriteLine(isValid);  // true

Features

  • Runtime compilation — schemas are compiled into an in-memory evaluator in milliseconds, with zero-allocation validation once warm
  • Full schema support — draft 4, 6, 7, 2019-09, and 2020-12
  • Detailed diagnostics — validation results include schema location, evaluation path, and error messages
  • Caching — compiled schemas are cached by canonical URI and reused across documents
  • Regular expression match timeout. A pattern match that runs for longer than 1 second throws RegexMatchTimeoutException out of Validate, because some patterns take .NET's engine longer than anyone will wait. JsonSchema.Options(regexMatchTimeout: TimeSpan.FromSeconds(5)) sets another timeout, and Regex.InfiniteMatchTimeout sets none
  • ECMA-262 patterns. pattern and patternProperties are answered as an ECMAScript engine answers them, and a schema whose pattern is not a valid ECMA-262 regular expression is refused when it is compiled, and so is one whose pattern is over a limit of size, with a message that says it is too large
  • Optional runtime code generation. JsonSchema.Options(codeGeneration: JsonSchemaCodeGeneration.AfterWarmUp) compiles a schema to IL once it is in steady use, for about half the warm validation time. Off by default
Package Purpose
Corvus.Text.Json Core runtime library
Corvus.Text.Json.SourceGenerator Build-time alternative for known schemas

Documentation

See the Runtime Schema Validation guide.

License

Apache 2.0 — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.7.9 2,951 10/17/2026
5.7.8 422 10/17/2026
5.7.7 1,160 10/14/2026
5.7.6 3,888 10/7/2026
5.7.5 16,915 10/1/2026
5.7.4 1,269 10/1/2026
5.7.3 619 9/29/2026
5.6.1 7,250 9/13/2026
5.5.5 1,589 9/9/2026
5.5.4 257 9/1/2026
5.5.3 125 9/1/2026
5.5.2 613 8/30/2026
5.5.1 122 8/30/2026
5.5.0 132 8/27/2026
5.4.3 150 8/26/2026
5.4.2 1,488 8/26/2026
5.4.1 399 8/20/2026
5.4.0 123 8/19/2026
5.3.2 168 8/10/2026
Loading failed