JsonSchema.Net
7.0.0
See the version list below for details.
Requires NuGet 2.12 or higher.
dotnet add package JsonSchema.Net --version 7.0.0
NuGet\Install-Package JsonSchema.Net -Version 7.0.0
<PackageReference Include="JsonSchema.Net" Version="7.0.0" />
paket add JsonSchema.Net --version 7.0.0
#r "nuget: JsonSchema.Net, 7.0.0"
// Install JsonSchema.Net as a Cake Addin
#addin nuget:?package=JsonSchema.Net&version=7.0.0
// Install JsonSchema.Net as a Cake Tool
#tool nuget:?package=JsonSchema.Net&version=7.0.0
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").
Links
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);
Product | Versions 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. |
.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. |
-
- Json.More.Net (>= 2.0.0)
- JsonPointer.Net (>= 4.0.0)
NuGet packages (65)
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 |
|
Qart.Testing
Package Description |
|
CycloneDX.Core
A .NET Standard library for CycloneDX bill-of-material documents. |
|
Microsoft.DocAsCode.Build.SchemaDriven
Package Description |
GitHub repositories (7)
Showing the top 5 popular GitHub repositories that depend on JsonSchema.Net:
Repository | Stars |
---|---|
PowerShell/PowerShell
PowerShell for every system!
|
|
dotnet/docfx
Static site generator for .NET API documentation.
|
|
dotnet/aspire
An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
|
|
dotnet/crank
Benchmarking infrastructure for applications
|
|
dotnet/dotnet
Home of .NET's Virtual Monolithic Repository which includes all the code needed to build the .NET SDK from source
|
Version | Downloads | Last updated | |
---|---|---|---|
7.0.4 | 9,201 | 6/8/2024 | |
7.0.3 | 7,244 | 6/3/2024 | |
7.0.2 | 44,138 | 5/13/2024 | |
7.0.1 | 11,664 | 5/7/2024 | |
7.0.0.3 | 11,835 | 5/1/2024 | |
6.1.2 | 26,905 | 4/22/2024 | |
6.1.1 | 5,574 | 4/20/2024 | |
6.1.0.1 | 19,873 | 4/19/2024 | |
6.1.0 | 11,650 | 4/18/2024 | |
6.0.7 | 62,060 | 3/25/2024 | |
6.0.6 | 1,825 | 3/24/2024 | |
6.0.5 | 41,084 | 3/18/2024 | |
6.0.4 | 42,982 | 3/3/2024 | |
6.0.3 | 95,592 | 2/19/2024 | |
6.0.2 | 21,506 | 2/7/2024 | |
6.0.1 | 11,991 | 2/3/2024 | |
6.0.0 | 28,899 | 2/3/2024 | |
5.5.1 | 123,707 | 1/21/2024 | |
5.5.0 | 87,901 | 1/8/2024 | |
5.4.3 | 54,555 | 12/19/2023 | |
5.4.2 | 549,627 | 12/5/2023 | |
5.4.1 | 6,785 | 12/2/2023 | |
5.4.0 | 65,256 | 11/21/2023 | |
5.3.1 | 270,424 | 11/4/2023 | |
5.3.0 | 11,530 | 10/30/2023 | |
5.2.7 | 423,459 | 10/28/2023 | |
5.2.6 | 166,127 | 10/1/2023 | |
5.2.5 | 59,133 | 9/10/2023 | |
5.2.4 | 724 | 9/10/2023 | |
5.2.3 | 2,085 | 9/8/2023 | |
5.2.2 | 385 | 9/7/2023 | |
5.2.1 | 28,452 | 9/1/2023 | |
5.2.0 | 23,420 | 8/22/2023 | |
5.1.3 | 55,726 | 8/5/2023 | |
5.1.0 | 1,841 | 8/4/2023 | |
5.0.0 | 1,223 | 8/2/2023 | |
4.1.8 | 112,913 | 7/21/2023 | |
4.1.7 | 2,825 | 7/20/2023 | |
4.1.6 | 190,906 | 7/3/2023 | |
4.1.5 | 536,688 | 6/13/2023 | |
4.1.4 | 367 | 6/13/2023 | |
4.1.3 | 2,259 | 6/10/2023 | |
4.1.2 | 5,524 | 6/7/2023 | |
4.1.1 | 186,718 | 5/5/2023 | |
4.1.0 | 32,720 | 4/30/2023 | |
4.0.7 | 903 | 4/28/2023 | |
4.0.6 | 15,707 | 4/23/2023 | |
4.0.5 | 5,619 | 4/20/2023 | |
4.0.4 | 31,728 | 4/19/2023 | |
4.0.3 | 78,766 | 4/5/2023 | |
4.0.2 | 17,751 | 3/29/2023 | |
4.0.1 | 8,432 | 3/27/2023 | |
4.0.0 | 68,438 | 3/19/2023 | |
4.0.0-beta3 | 5,341 | 2/28/2023 | |
4.0.0-beta2 | 7,787 | 12/14/2022 | |
4.0.0-beta1a | 631 | 12/1/2022 | |
3.3.2 | 723,676 | 11/13/2022 | |
3.3.1 | 1,962 | 11/11/2022 | |
3.3.0 | 34,414 | 11/6/2022 | |
3.2.1 | 213,120 | 9/4/2022 | |
3.2.0 | 338,556 | 7/11/2022 | |
3.1.5 | 4,142 | 7/11/2022 | |
3.1.4 | 7,932 | 7/5/2022 | |
3.1.3 | 486 | 7/5/2022 | |
3.1.2 | 12,174 | 6/28/2022 | |
3.1.1 | 18,362 | 6/16/2022 | |
3.1.0 | 3,392 | 6/15/2022 | |
3.0.0 | 7,198 | 6/13/2022 | |
2.4.0 | 104,368 | 5/26/2022 | |
2.3.0 | 95,142 | 4/4/2022 | |
2.2.1 | 17,222 | 3/31/2022 | |
2.2.0 | 42,360 | 3/24/2022 | |
2.1.2 | 18,587 | 3/22/2022 | |
2.1.1 | 19,936 | 2/25/2022 | |
2.1.0 | 5,219 | 2/23/2022 | |
2.0.3 | 11,780 | 2/12/2022 | |
2.0.2 | 12,264 | 2/9/2022 | |
2.0.1 | 47,938 | 1/28/2022 | |
2.0.0 | 49,874 | 1/13/2022 | |
1.13.0 | 18,243 | 1/12/2022 | |
1.12.0 | 49,164 | 12/5/2021 | |
1.11.6 | 15,705 | 11/29/2021 | |
1.11.5 | 30,377 | 11/11/2021 | |
1.11.4 | 4,759 | 11/5/2021 | |
1.11.3 | 128,355 | 9/22/2021 | |
1.11.2 | 82,070 | 9/5/2021 | |
1.11.1 | 458 | 9/5/2021 | |
1.11.0 | 433 | 9/4/2021 | |
1.10.8 | 14,240 | 8/27/2021 | |
1.10.7 | 118,774 | 7/13/2021 | |
1.10.6 | 16,189 | 7/2/2021 | |
1.10.5 | 1,709 | 6/29/2021 | |
1.10.4 | 18,656 | 6/20/2021 | |
1.10.3 | 29,247 | 6/5/2021 | |
1.10.2 | 40,272 | 4/17/2021 | |
1.10.1 | 894 | 4/14/2021 | |
1.10.0 | 1,702 | 4/10/2021 | |
1.9.4 | 5,751 | 4/3/2021 | |
1.9.3 | 30,437 | 3/5/2021 | |
1.9.2 | 491 | 3/3/2021 | |
1.9.1 | 22,482 | 2/24/2021 | |
1.9.0 | 850 | 2/24/2021 | |
1.8.0 | 7,553 | 2/3/2021 | |
1.7.1 | 4,971 | 1/21/2021 | |
1.7.0 | 1,786 | 1/17/2021 | |
1.6.1 | 2,625 | 1/1/2021 | |
1.6.0 | 7,548 | 12/14/2020 | |
1.5.4 | 5,271 | 11/28/2020 | |
1.5.3 | 1,941 | 11/26/2020 | |
1.5.2 | 881 | 11/22/2020 | |
1.5.1 | 2,032 | 11/3/2020 | |
1.5.0 | 620 | 11/1/2020 | |
1.4.0 | 528 | 10/30/2020 | |
1.3.1 | 598 | 10/22/2020 | |
1.3.0 | 937 | 10/17/2020 | |
1.2.0 | 1,933 | 10/9/2020 | |
1.1.0 | 616 | 10/5/2020 | |
1.0.3 | 535 | 9/29/2020 | |
1.0.2 | 1,737 | 9/1/2020 | |
1.0.1 | 547 | 9/1/2020 | |
1.0.0 | 2,471 | 8/29/2020 | |
1.0.0-rc2 | 341 | 8/29/2020 | |
1.0.0-rc1 | 331 | 8/28/2020 |
Release notes can be found at https://json-everything.net/json-schema