JsonSchema.Net 7.2.3

There is a newer version of this package available.
See the version list below for details.

Requires NuGet 2.12 or higher.

dotnet add package JsonSchema.Net --version 7.2.3
                    
NuGet\Install-Package JsonSchema.Net -Version 7.2.3
                    
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="JsonSchema.Net" Version="7.2.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JsonSchema.Net" Version="7.2.3" />
                    
Directory.Packages.props
<PackageReference Include="JsonSchema.Net" />
                    
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 JsonSchema.Net --version 7.2.3
                    
#r "nuget: JsonSchema.Net, 7.2.3"
                    
#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 JsonSchema.Net@7.2.3
                    
#: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=JsonSchema.Net&version=7.2.3
                    
Install as a Cake Addin
#tool nuget:?package=JsonSchema.Net&version=7.2.3
                    
Install as a Cake Tool

Summary

JsonSchema.Net fully implements the JSON Schema specifications, a declarative syntax for validation and annotating JSON data.

Supported specifications:

  • Draft 6 - http://json-schema.org/draft-06/schema#
  • Draft 7 - http://json-schema.org/draft-07/schema#
  • Draft 2019-09 - https://json-schema.org/draft/2019-09/schema
  • Draft 2020-12 - https://json-schema.org/draft/2020-12/schema

This project also operates as a test bed for features proposed for the next version ("draft/next").

Usage

Parse a schema:

var schema = JsonSchema.FromText(content);

Load one from a file:

var schema = JsonSchema.FromFile(filename);

Directly deserialize it:

var schema = JsonSerializer.Deserialize<JsonSchema>(content);

Or build it explicitly in code:

var schema = new JsonSchemaBuilder()
    .Comment("a comment")
    .Title("A title for my schema")
    .Type(SchemaValueType.Object)
    .Properties(
        ("foo", new JsonSchemaBuilder()
            .Type(SchemaValueType.String)
        ),
        ("bar", new JsonSchemaBuilder()
            .Type(SchemaValueType.Number)
        )
    )
    .Build();

Use the schema to evaluate and annotate data:

var instance = JsonNode.Parse("{\"foo\":\"a value\",\"bar\":42}");
var results = schema.Evaluate(instance);

Sponsorship

If you found this library helpful and would like to promote continued development, please consider sponsoring the maintainers.

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 is compatible.  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 was computed.  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 was computed.  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 was computed. 
.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 (90)

Showing the top 5 NuGet packages that depend on JsonSchema.Net:

Package Downloads
Microsoft.PowerShell.Commands.Utility

Runtime for hosting PowerShell

JsonSchema.Net.Generation

Extends JsonSchema.Net to provide schema generation functionality

CycloneDX.Core

A .NET Standard library for CycloneDX bill-of-material documents.

Microsoft.SemanticKernel.Plugins.OpenApi

Semantic Kernel OpenAPI Plugins

Qart.Testing

Package Description

GitHub repositories (27)

Showing the top 20 popular GitHub repositories that depend on JsonSchema.Net:

Repository Stars
PowerShell/PowerShell
PowerShell for every system!
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
dotnet/runtime
.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
dotnet/machinelearning
ML.NET is an open source and cross-platform machine learning framework for .NET.
dotnet/yarp
A toolkit for developing high-performance HTTP reverse proxy applications.
ChilliCream/graphql-platform
Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Nitro the awesome Monaco based GraphQL IDE.
dotnet/aspire
Tools, templates, and packages to accelerate building observable, production-ready apps
dotnet/docfx
Static site generator for .NET API documentation.
modelcontextprotocol/csharp-sdk
The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft.
dotnet/interactive
.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
dotnet/extensions
This repository contains a suite of libraries that provide facilities commonly needed when creating production-ready applications.
dotnet/crank
Benchmarking infrastructure for applications
CodeMazeBlog/CodeMazeGuides
The main repository for all the Code Maze guides
JustAman62/undercut-f1
F1 Live Timing TUI for all F1 sessions with variable delay to sync to your TV. Supports replaying previously recorded sessions.
dotnet/dotnet
Home of .NET's Virtual Monolithic Repository which includes all the code needed to build the .NET SDK.
Azure/Industrial-IoT
Azure Industrial IoT Platform
CommunityToolkit/Aspire
A community project with additional components and extensions for .NET Aspire
microsoft/PowerApps-Tooling
Tooling support for PowerApps language and .msapp files
LEGO/AsyncAPI.NET
The AsyncAPI.NET SDK contains a useful object model for AsyncAPI documents in .NET
ptr727/PlexCleaner
Utility to optimize media files for Direct Play in Plex, Emby, Jellyfin, etc.
Version Downloads Last Updated
7.4.0 138,226 8/6/2025
7.3.4 871,184 3/19/2025
7.3.3 420,832 2/10/2025
7.3.2 90,511 2/5/2025
7.3.1 713,696 12/28/2024
7.3.0 379,490 12/1/2024
7.2.3 2,063,446 9/20/2024
7.2.2 253,370 8/18/2024
7.2.1 3,095 8/16/2024
7.2.0 110,711 8/7/2024
7.1.2 559,653 7/2/2024
7.1.1 41,156 6/28/2024
7.1.0 26,013 6/25/2024
7.0.4 1,301,785 6/8/2024
7.0.3 47,112 6/3/2024
7.0.2 126,110 5/13/2024
7.0.1 44,969 5/7/2024
7.0.0.3 58,883 5/1/2024
6.1.2 173,238 4/22/2024
6.1.1 10,358 4/20/2024 6.1.1 is deprecated because it has critical bugs.
6.1.0.1 196,545 4/19/2024 6.1.0.1 is deprecated because it has critical bugs.
6.1.0 53,426 4/18/2024 6.1.0 is deprecated because it has critical bugs.
6.0.7 131,868 3/25/2024
6.0.6 4,784 3/24/2024
6.0.5 84,578 3/18/2024
6.0.4 112,119 3/3/2024
6.0.3 247,686 2/19/2024
6.0.2 31,497 2/7/2024
6.0.1 16,864 2/3/2024
6.0.0 76,514 2/3/2024
5.5.1 371,807 1/21/2024
5.5.0 197,150 1/8/2024
5.4.3 123,633 12/19/2023
5.4.2 1,444,515 12/5/2023
5.4.1 9,336 12/2/2023
5.4.0 107,662 11/21/2023
5.3.1 687,100 11/4/2023
5.3.0 21,288 10/30/2023
5.2.7 1,956,012 10/28/2023
5.2.6 313,507 10/1/2023
5.2.5 71,860 9/10/2023
5.2.4 1,399 9/10/2023
5.2.3 12,113 9/8/2023
5.2.2 578 9/7/2023
5.2.1 29,037 9/1/2023
5.2.0 37,170 8/22/2023
5.1.3 73,048 8/5/2023
5.1.0 2,481 8/4/2023
5.0.0 2,878 8/2/2023
4.1.8 140,351 7/21/2023
4.1.7 3,211 7/20/2023
4.1.6 325,023 7/3/2023
4.1.5 1,910,046 6/13/2023
4.1.4 662 6/13/2023
4.1.3 2,682 6/10/2023
4.1.2 8,254 6/7/2023
4.1.1 325,961 5/5/2023
4.1.0 61,543 4/30/2023
4.0.7 1,322 4/28/2023
4.0.6 18,013 4/23/2023
4.0.5 6,148 4/20/2023
4.0.4 68,209 4/19/2023
4.0.3 122,031 4/5/2023
4.0.2 25,977 3/29/2023
4.0.1 9,462 3/27/2023
4.0.0 104,630 3/19/2023
4.0.0-beta3 5,742 2/28/2023
4.0.0-beta2 8,204 12/14/2022
4.0.0-beta1a 767 12/1/2022
3.3.2 1,203,443 11/13/2022
3.3.1 2,319 11/11/2022
3.3.0 36,500 11/6/2022
3.2.1 267,654 9/4/2022
3.2.0 435,749 7/11/2022
3.1.5 5,961 7/11/2022
3.1.4 10,341 7/5/2022
3.1.3 645 7/5/2022
3.1.2 14,138 6/28/2022
3.1.1 22,714 6/16/2022
3.1.0 4,466 6/15/2022
3.0.0 7,760 6/13/2022
2.4.0 122,792 5/26/2022
2.3.0 99,233 4/4/2022
2.2.1 20,281 3/31/2022
2.2.0 69,018 3/24/2022
2.1.2 19,199 3/22/2022
2.1.1 23,560 2/25/2022
2.1.0 6,383 2/23/2022
2.0.3 13,636 2/12/2022
2.0.2 14,212 2/9/2022
2.0.1 58,737 1/28/2022
2.0.0 90,122 1/13/2022
1.13.0 18,805 1/12/2022
1.12.0 51,152 12/5/2021
1.11.6 16,503 11/29/2021
1.11.5 54,611 11/11/2021
1.11.4 10,305 11/5/2021
1.11.3 132,193 9/22/2021
1.11.2 86,496 9/5/2021
1.11.1 618 9/5/2021
1.11.0 612 9/4/2021
1.10.8 17,766 8/27/2021
1.10.7 151,509 7/13/2021
1.10.6 19,636 7/2/2021
1.10.5 1,944 6/29/2021
1.10.4 25,952 6/20/2021
1.10.3 32,410 6/5/2021
1.10.2 48,516 4/17/2021
1.10.1 1,085 4/14/2021
1.10.0 1,882 4/10/2021
1.9.4 6,050 4/3/2021
1.9.3 31,167 3/5/2021
1.9.2 671 3/3/2021
1.9.1 25,782 2/24/2021
1.9.0 1,105 2/24/2021
1.8.0 7,933 2/3/2021
1.7.1 7,297 1/21/2021
1.7.0 2,087 1/17/2021
1.6.1 3,866 1/1/2021
1.6.0 7,755 12/14/2020
1.5.4 5,505 11/28/2020
1.5.3 3,205 11/26/2020
1.5.2 1,067 11/22/2020
1.5.1 2,348 11/3/2020
1.5.0 809 11/1/2020
1.4.0 711 10/30/2020
1.3.1 794 10/22/2020
1.3.0 1,131 10/17/2020
1.2.0 3,145 10/9/2020
1.1.0 1,042 10/5/2020
1.0.3 720 9/29/2020
1.0.2 1,941 9/1/2020
1.0.1 761 9/1/2020
1.0.0 23,881 8/29/2020
1.0.0-rc2 527 8/29/2020
1.0.0-rc1 500 8/28/2020

Release notes can be found at https://json-everything.net/json-schema