JsonSchema.Net 7.2.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").

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.

Showing the top 20 packages that depend on JsonSchema.Net.

Packages Downloads
JsonSchema.Net.Generation
Extends JsonSchema.Net to provide schema generation functionality.
6
JsonSchema.Net.Generation
Extends JsonSchema.Net to provide schema generation functionality.
7
JsonSchema.Net.Generation
Extends JsonSchema.Net to provide schema generation functionality. Read the full documentation at https://docs.json-everything.net/schema/schema-generation/.
6
Microsoft.SemanticKernel.Plugins.OpenApi
Semantic Kernel OpenAPI Plugins
6

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

Any 0.0

Version Downloads Last updated
7.3.4 5 05/11/2025
7.3.3 5 05/12/2025
7.3.2 5 05/12/2025
7.3.1 5 05/12/2025
7.3.0 5 05/12/2025
7.2.3 5 05/12/2025
7.2.2 5 05/12/2025
7.2.1 5 05/12/2025
7.2.0 5 05/12/2025
7.1.2 5 05/12/2025
7.1.1 5 05/12/2025
7.1.0 5 05/12/2025
7.0.4 5 05/12/2025
7.0.3 5 05/12/2025
7.0.2 5 05/12/2025
7.0.1 5 05/12/2025
7.0.0.3 5 05/12/2025
6.1.2 5 05/12/2025
6.1.1 4 05/12/2025
6.1.0.1 5 05/12/2025
6.1.0 5 05/12/2025
6.0.7 5 05/12/2025
6.0.6 5 05/12/2025
6.0.5 5 05/12/2025
6.0.4 5 05/12/2025
6.0.3 5 05/12/2025
6.0.2 5 05/12/2025
6.0.1 5 05/13/2025
6.0.0 5 05/12/2025
5.5.1 5 05/12/2025
5.5.0 5 05/12/2025
5.4.3 5 05/12/2025
5.4.2 6 05/08/2025
5.4.1 5 05/12/2025
5.4.0 5 05/12/2025
5.3.1 5 05/12/2025
5.3.0 5 05/12/2025
5.2.7 5 05/12/2025
5.2.6 5 05/12/2025
5.2.5 5 05/12/2025
5.2.4 5 05/12/2025
5.2.3 5 05/12/2025
5.2.2 5 05/12/2025
5.2.1 5 05/12/2025
5.2.0 5 05/12/2025
5.1.3 5 05/12/2025
5.1.0 5 05/12/2025
5.0.0 5 05/12/2025
4.1.8 5 05/12/2025
4.1.7 5 05/12/2025
4.1.6 5 05/12/2025
4.1.5 5 05/12/2025
4.1.4 5 05/12/2025
4.1.3 5 05/13/2025
4.1.2 5 05/12/2025
4.1.1 5 05/12/2025
4.1.0 5 05/12/2025
4.0.7 5 05/12/2025
4.0.6 5 05/12/2025
4.0.5 5 05/12/2025
4.0.4 5 05/12/2025
4.0.3 5 05/12/2025
4.0.2 5 05/12/2025
4.0.1 5 05/12/2025
4.0.0 5 05/12/2025
4.0.0-beta3 5 05/12/2025
4.0.0-beta2 5 05/12/2025
4.0.0-beta1a 5 05/12/2025
3.3.2 5 05/12/2025
3.3.1 5 05/12/2025
3.3.0 5 05/12/2025
3.2.1 5 05/12/2025
3.2.0 5 05/12/2025
3.1.5 5 05/12/2025
3.1.4 5 05/12/2025
3.1.3 5 05/12/2025
3.1.2 5 05/12/2025
3.1.1 5 05/12/2025
3.1.0 5 05/12/2025
3.0.0 5 05/12/2025
2.4.0 5 05/12/2025
2.3.0 5 05/12/2025
2.2.1 5 05/12/2025
2.2.0 5 05/12/2025
2.1.2 5 05/12/2025
2.1.1 5 05/12/2025
2.1.0 5 05/12/2025
2.0.3 5 05/12/2025
2.0.2 5 05/12/2025
2.0.1 5 05/12/2025
2.0.0 5 05/12/2025
1.13.0 5 05/12/2025
1.12.0 5 05/12/2025
1.11.6 5 05/12/2025
1.11.5 5 05/12/2025
1.11.4 5 05/12/2025
1.11.3 5 05/12/2025
1.11.2 5 05/12/2025
1.11.1 4 05/12/2025
1.11.0 5 05/12/2025
1.10.8 5 05/12/2025
1.10.7 5 05/12/2025
1.10.6 5 05/12/2025
1.10.5 5 05/12/2025
1.10.4 5 05/12/2025
1.10.3 5 05/12/2025
1.10.2 5 05/12/2025
1.10.1 5 05/12/2025
1.10.0 5 05/12/2025
1.9.4 5 05/12/2025
1.9.3 2 05/12/2025
1.9.2 5 05/12/2025
1.9.1 5 05/12/2025
1.9.0 5 05/12/2025
1.8.0 5 05/12/2025
1.7.1 5 05/12/2025
1.7.0 4 05/12/2025
1.6.1 5 05/12/2025
1.6.0 5 05/12/2025
1.5.4 5 05/12/2025
1.5.3 5 05/12/2025
1.5.2 5 05/12/2025
1.5.1 5 05/12/2025
1.5.0 5 05/12/2025
1.4.0 5 05/12/2025
1.3.1 5 05/12/2025
1.3.0 5 05/12/2025
1.2.0 5 05/12/2025
1.1.0 5 05/12/2025
1.0.3 5 05/12/2025
1.0.2 5 05/12/2025
1.0.1 5 05/12/2025
1.0.0 5 05/12/2025
1.0.0-rc2 5 05/12/2025
1.0.0-rc1 5 05/12/2025