Newtonsoft.Json.Schema
4.0.1
Prefix Reserved
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 3.5
This package targets .NET Framework 3.5. The package is compatible with this framework or higher.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
Requires NuGet 2.12 or higher.
dotnet add package Newtonsoft.Json.Schema --version 4.0.1
NuGet\Install-Package Newtonsoft.Json.Schema -Version 4.0.1
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="Newtonsoft.Json.Schema" Version="4.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Newtonsoft.Json.Schema" Version="4.0.1" />Directory.Packages.props
<PackageReference Include="Newtonsoft.Json.Schema" />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 Newtonsoft.Json.Schema --version 4.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Newtonsoft.Json.Schema, 4.0.1"
#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 Newtonsoft.Json.Schema@4.0.1
#: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=Newtonsoft.Json.Schema&version=4.0.1Install as a Cake Addin
#tool nuget:?package=Newtonsoft.Json.Schema&version=4.0.1Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Logo Json.NET Schema
NuGet version (Newtonsoft.Json.Schema) Build status
Json.NET Schema is a powerful, complete and easy to use JSON Schema framework for .NET
Validate JSON
JSchema schema = JSchema.Parse(@"{
'type': 'object',
'properties': {
'name': {'type':'string'},
'roles': {'type': 'array'}
}
}");
JObject user = JObject.Parse(@"{
'name': 'Arnie Admin',
'roles': ['Developer', 'Administrator']
}");
bool valid = user.IsValid(schema);
// true
Generate Schemas
JSchemaGenerator generator = new JSchemaGenerator();
JSchema schema = generator.Generate(typeof(Account));
// {
// "type": "object",
// "properties": {
// "email": { "type": "string", "format": "email" }
// },
// "required": [ "email" ]
// }
public class Account
{
[EmailAddress]
[JsonProperty("email", Required = Required.Always)]
public string Email;
}
Validate Deserialization
JSchema schema = JSchema.Parse(@"{
'type': 'array',
'item': {'type':'string'}
}");
JsonTextReader reader = new JsonTextReader(new StringReader(@"[
'Developer',
'Administrator'
]"));
JSchemaValidatingReader validatingReader = new JSchemaValidatingReader(reader);
validatingReader.Schema = schema;
JsonSerializer serializer = new JsonSerializer();
List<string> roles = serializer.Deserialize<List<string>>(validatingReader);
Links
| 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 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 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 is compatible. |
| .NET Framework | net35 is compatible. net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. 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.
-
.NETFramework 3.5
- Newtonsoft.Json (>= 13.0.3)
-
.NETFramework 4.0
- Newtonsoft.Json (>= 13.0.3)
-
.NETFramework 4.5
- Newtonsoft.Json (>= 13.0.3)
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.3)
-
.NETStandard 2.1
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (243)
Showing the top 5 NuGet packages that depend on Newtonsoft.Json.Schema:
| Package | Downloads |
|---|---|
|
RestAssured
Package Description |
|
|
Hochfrequenz.BO4Enet
Package Description |
|
|
CyberEye.Constant.Lib
Package chứa các class constants, các enums và packages dùng chung |
|
|
JUST.NETCore
This a cool library in .NET Core which enables you to transform a JSON document into another JSON document using JSON transformations using JSON path. This is the JSON equivalent of XSLT. Test project can be found at https://github.com/WorkMaze/JUST.net |
|
|
Microsoft.Azure.Workflows.WebJobs.Extension
Extensions for running workflows in Azure Functions |
GitHub repositories (50)
Showing the top 20 popular GitHub repositories that depend on Newtonsoft.Json.Schema:
| Repository | Stars |
|---|---|
|
btcpayserver/btcpayserver
Accept Bitcoin payments. Free, open-source & self-hosted, Bitcoin payment processor.
|
|
|
OpenTabletDriver/OpenTabletDriver
Open source, cross-platform, user-mode tablet driver
|
|
|
dotnet/corert
This repo contains CoreRT, an experimental .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying compiler toolchain.
|
|
|
ErsatzTV/legacy
Open-source platform that transforms your personal media library into live, custom TV channels.
|
|
|
Pathoschild/SMAPI
The modding API for Stardew Valley.
|
|
|
microsoft/AdaptiveCards
A new way for developers to exchange card content in a common and consistent way.
|
|
|
dotnet/Nerdbank.GitVersioning
Stamp your assemblies, packages and more with a unique version generated from a single, simple version.json file and include git commit IDs for non-official builds.
|
|
|
Azure/data-api-builder
Data API builder provides modern REST, GraphQL endpoints and MCP tools to your Azure Databases and on-prem stores.
|
|
|
json-everything/json-everything
System.Text.Json-based support for all of your JSON needs.
|
|
|
CodeMazeBlog/CodeMazeGuides
The main repository for all the Code Maze guides
|
|
|
microsoft/botbuilder-dotnet
Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
|
|
|
simpleidserver/SimpleIdServer
OpenID, OAuth 2.0, SCIM2.0, UMA2.0, FAPI, CIBA & OPENBANKING Framework for ASP.NET Core
|
|
|
ic3w0lf22/Roblox-Account-Manager
Application that allows you to add multiple accounts into one application allowing you to easily play on alt accounts without having to change accounts
|
|
|
GoogleCloudPlatform/dotnet-docs-samples
.NET code samples used on https://cloud.google.com
|
|
|
dotnet/dev-proxy
Simulate API failures, throttling, and chaos — all from your command line.
|
|
|
Azure/azure-cosmos-dotnet-v3
.NET SDK for Azure Cosmos DB for the core SQL API
|
|
|
open-telemetry/opentelemetry-dotnet-contrib
This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
|
|
|
microsoft/winget-create
The Windows Package Manager Manifest Creator command-line tool (aka wingetcreate)
|
|
|
nkdAgility/azure-devops-migration-tools
Azure DevOps Migration Tools allow you to migrate Teams, Backlogs, Work Items, Tasks, Test Cases, and Plans & Suits from one Project to another in Azure DevOps / TFS both within the same Organisation, and between Organisations.
|
|
|
microsoft/component-detection
Scans your project to determine what components you use
|
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.2-beta2 | 116,495 | 2/16/2025 |
| 4.0.2-beta1 | 103,319 | 9/16/2024 |
| 4.0.1 | 12,265,801 | 6/8/2024 |
| 3.0.16 | 2,979,564 | 5/6/2024 |
| 3.0.15 | 11,628,788 | 4/29/2023 |
| 3.0.14 | 25,627,644 | 2/21/2021 |
| 3.0.13 | 11,858,723 | 1/27/2020 |
| 3.0.12 | 25,438 | 1/27/2020 |
| 3.0.11 | 5,335,731 | 4/22/2019 |
| 3.0.10 | 13,623,559 | 3/23/2018 |
| 3.0.9 | 143,552 | 3/2/2018 |
Loading failed