JsonSchema.Net
7.0.1
See the version list below for details.
Requires NuGet 2.12 or higher.
dotnet add package JsonSchema.Net --version 7.0.1
NuGet\Install-Package JsonSchema.Net -Version 7.0.1
<PackageReference Include="JsonSchema.Net" Version="7.0.1" />
paket add JsonSchema.Net --version 7.0.1
#r "nuget: JsonSchema.Net, 7.0.1"
// Install JsonSchema.Net as a Cake Addin #addin nuget:?package=JsonSchema.Net&version=7.0.1 // Install JsonSchema.Net as a Cake Tool #tool nuget:?package=JsonSchema.Net&version=7.0.1
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. |
-
- JsonPointer.Net (>= 5.0.0)
NuGet packages (68)
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. |
|
Qart.Testing
Package Description |
|
com.etsoo.CoreFramework
ETSOO Shared Core Framework 亿速思维共享核心框架 |
GitHub repositories (15)
Showing the top 5 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/docfx
Static site generator for .NET API documentation.
|
|
dotnet/aspire
Tools, templates, and packages to accelerate building observable, production-ready apps
|
Version | Downloads | Last updated | |
---|---|---|---|
7.2.3 | 129,778 | 9/20/2024 | |
7.2.2 | 112,914 | 8/18/2024 | |
7.2.1 | 1,774 | 8/16/2024 | |
7.2.0 | 52,710 | 8/7/2024 | |
7.1.2 | 210,437 | 7/2/2024 | |
7.1.1 | 25,580 | 6/28/2024 | |
7.1.0 | 14,722 | 6/25/2024 | |
7.0.4 | 161,321 | 6/8/2024 | |
7.0.3 | 25,061 | 6/3/2024 | |
7.0.2 | 89,321 | 5/13/2024 | |
7.0.1 | 28,156 | 5/7/2024 | |
7.0.0.3 | 37,027 | 5/1/2024 | |
6.1.2 | 71,546 | 4/22/2024 | |
6.1.1 | 6,557 | 4/20/2024 | |
6.1.0.1 | 84,919 | 4/19/2024 | |
6.1.0 | 24,430 | 4/18/2024 | |
6.0.7 | 88,378 | 3/25/2024 | |
6.0.6 | 2,523 | 3/24/2024 | |
6.0.5 | 76,005 | 3/18/2024 | |
6.0.4 | 72,837 | 3/3/2024 | |
6.0.3 | 169,909 | 2/19/2024 | |
6.0.2 | 25,075 | 2/7/2024 | |
6.0.1 | 14,789 | 2/3/2024 | |
6.0.0 | 55,096 | 2/3/2024 | |
5.5.1 | 200,465 | 1/21/2024 | |
5.5.0 | 132,052 | 1/8/2024 | |
5.4.3 | 75,649 | 12/19/2023 | |
5.4.2 | 850,092 | 12/5/2023 | |
5.4.1 | 7,900 | 12/2/2023 | |
5.4.0 | 81,690 | 11/21/2023 | |
5.3.1 | 368,700 | 11/4/2023 | |
5.3.0 | 17,083 | 10/30/2023 | |
5.2.7 | 1,050,313 | 10/28/2023 | |
5.2.6 | 223,306 | 10/1/2023 | |
5.2.5 | 67,492 | 9/10/2023 | |
5.2.4 | 754 | 9/10/2023 | |
5.2.3 | 4,832 | 9/8/2023 | |
5.2.2 | 416 | 9/7/2023 | |
5.2.1 | 28,783 | 9/1/2023 | |
5.2.0 | 29,650 | 8/22/2023 | |
5.1.3 | 67,068 | 8/5/2023 | |
5.1.0 | 2,185 | 8/4/2023 | |
5.0.0 | 1,748 | 8/2/2023 | |
4.1.8 | 122,987 | 7/21/2023 | |
4.1.7 | 2,899 | 7/20/2023 | |
4.1.6 | 226,105 | 7/3/2023 | |
4.1.5 | 921,156 | 6/13/2023 | |
4.1.4 | 398 | 6/13/2023 | |
4.1.3 | 2,320 | 6/10/2023 | |
4.1.2 | 6,866 | 6/7/2023 | |
4.1.1 | 215,918 | 5/5/2023 | |
4.1.0 | 44,813 | 4/30/2023 | |
4.0.7 | 1,013 | 4/28/2023 | |
4.0.6 | 16,691 | 4/23/2023 | |
4.0.5 | 5,691 | 4/20/2023 | |
4.0.4 | 45,277 | 4/19/2023 | |
4.0.3 | 96,345 | 4/5/2023 | |
4.0.2 | 19,904 | 3/29/2023 | |
4.0.1 | 8,702 | 3/27/2023 | |
4.0.0 | 84,515 | 3/19/2023 | |
4.0.0-beta3 | 5,444 | 2/28/2023 | |
4.0.0-beta2 | 7,972 | 12/14/2022 | |
4.0.0-beta1a | 656 | 12/1/2022 | |
3.3.2 | 912,209 | 11/13/2022 | |
3.3.1 | 2,134 | 11/11/2022 | |
3.3.0 | 34,790 | 11/6/2022 | |
3.2.1 | 234,180 | 9/4/2022 | |
3.2.0 | 387,620 | 7/11/2022 | |
3.1.5 | 5,061 | 7/11/2022 | |
3.1.4 | 9,986 | 7/5/2022 | |
3.1.3 | 513 | 7/5/2022 | |
3.1.2 | 12,901 | 6/28/2022 | |
3.1.1 | 19,738 | 6/16/2022 | |
3.1.0 | 3,638 | 6/15/2022 | |
3.0.0 | 7,367 | 6/13/2022 | |
2.4.0 | 110,616 | 5/26/2022 | |
2.3.0 | 96,443 | 4/4/2022 | |
2.2.1 | 19,152 | 3/31/2022 | |
2.2.0 | 46,345 | 3/24/2022 | |
2.1.2 | 18,732 | 3/22/2022 | |
2.1.1 | 20,999 | 2/25/2022 | |
2.1.0 | 5,651 | 2/23/2022 | |
2.0.3 | 12,532 | 2/12/2022 | |
2.0.2 | 13,452 | 2/9/2022 | |
2.0.1 | 51,223 | 1/28/2022 | |
2.0.0 | 62,334 | 1/13/2022 | |
1.13.0 | 18,409 | 1/12/2022 | |
1.12.0 | 49,865 | 12/5/2021 | |
1.11.6 | 16,185 | 11/29/2021 | |
1.11.5 | 38,977 | 11/11/2021 | |
1.11.4 | 6,823 | 11/5/2021 | |
1.11.3 | 130,309 | 9/22/2021 | |
1.11.2 | 85,448 | 9/5/2021 | |
1.11.1 | 482 | 9/5/2021 | |
1.11.0 | 464 | 9/4/2021 | |
1.10.8 | 16,474 | 8/27/2021 | |
1.10.7 | 129,868 | 7/13/2021 | |
1.10.6 | 16,583 | 7/2/2021 | |
1.10.5 | 1,803 | 6/29/2021 | |
1.10.4 | 21,669 | 6/20/2021 | |
1.10.3 | 30,236 | 6/5/2021 | |
1.10.2 | 43,350 | 4/17/2021 | |
1.10.1 | 945 | 4/14/2021 | |
1.10.0 | 1,732 | 4/10/2021 | |
1.9.4 | 5,826 | 4/3/2021 | |
1.9.3 | 30,837 | 3/5/2021 | |
1.9.2 | 518 | 3/3/2021 | |
1.9.1 | 23,787 | 2/24/2021 | |
1.9.0 | 900 | 2/24/2021 | |
1.8.0 | 7,747 | 2/3/2021 | |
1.7.1 | 5,565 | 1/21/2021 | |
1.7.0 | 1,852 | 1/17/2021 | |
1.6.1 | 2,875 | 1/1/2021 | |
1.6.0 | 7,572 | 12/14/2020 | |
1.5.4 | 5,338 | 11/28/2020 | |
1.5.3 | 2,447 | 11/26/2020 | |
1.5.2 | 909 | 11/22/2020 | |
1.5.1 | 2,047 | 11/3/2020 | |
1.5.0 | 655 | 11/1/2020 | |
1.4.0 | 556 | 10/30/2020 | |
1.3.1 | 623 | 10/22/2020 | |
1.3.0 | 975 | 10/17/2020 | |
1.2.0 | 2,356 | 10/9/2020 | |
1.1.0 | 760 | 10/5/2020 | |
1.0.3 | 568 | 9/29/2020 | |
1.0.2 | 1,779 | 9/1/2020 | |
1.0.1 | 600 | 9/1/2020 | |
1.0.0 | 4,280 | 8/29/2020 | |
1.0.0-rc2 | 391 | 8/29/2020 | |
1.0.0-rc1 | 352 | 8/28/2020 |
Release notes can be found at https://json-everything.net/json-schema