Table of Contents

Class JsonSchema

Namespace
Newtonsoft.Json.Schema
Assembly
Newtonsoft.Json.dll
[Obsolete("JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.")]
public class JsonSchema
Inheritance
JsonSchema
Inherited Members
Extension Methods

Constructors

JsonSchema()

public JsonSchema()

Properties

AdditionalItems

public JsonSchema AdditionalItems { get; set; }

Property Value

JsonSchema

AdditionalProperties

public JsonSchema AdditionalProperties { get; set; }

Property Value

JsonSchema

AllowAdditionalItems

public bool AllowAdditionalItems { get; set; }

Property Value

bool

AllowAdditionalProperties

public bool AllowAdditionalProperties { get; set; }

Property Value

bool

Default

public JToken Default { get; set; }

Property Value

JToken

Description

public string Description { get; set; }

Property Value

string

Disallow

public JsonSchemaType? Disallow { get; set; }

Property Value

JsonSchemaType?

DivisibleBy

public double? DivisibleBy { get; set; }

Property Value

double?

Enum

public IList<JToken> Enum { get; set; }

Property Value

IList<JToken>

ExclusiveMaximum

public bool? ExclusiveMaximum { get; set; }

Property Value

bool?

ExclusiveMinimum

public bool? ExclusiveMinimum { get; set; }

Property Value

bool?

Extends

public IList<JsonSchema> Extends { get; set; }

Property Value

IList<JsonSchema>

Format

public string Format { get; set; }

Property Value

string

Hidden

public bool? Hidden { get; set; }

Property Value

bool?

Id

public string Id { get; set; }

Property Value

string

Items

public IList<JsonSchema> Items { get; set; }

Property Value

IList<JsonSchema>

Maximum

public double? Maximum { get; set; }

Property Value

double?

MaximumItems

public int? MaximumItems { get; set; }

Property Value

int?

MaximumLength

public int? MaximumLength { get; set; }

Property Value

int?

Minimum

public double? Minimum { get; set; }

Property Value

double?

MinimumItems

public int? MinimumItems { get; set; }

Property Value

int?

MinimumLength

public int? MinimumLength { get; set; }

Property Value

int?

Pattern

public string Pattern { get; set; }

Property Value

string

PatternProperties

public IDictionary<string, JsonSchema> PatternProperties { get; set; }

Property Value

IDictionary<string, JsonSchema>

PositionalItemsValidation

public bool PositionalItemsValidation { get; set; }

Property Value

bool

Properties

public IDictionary<string, JsonSchema> Properties { get; set; }

Property Value

IDictionary<string, JsonSchema>

ReadOnly

public bool? ReadOnly { get; set; }

Property Value

bool?

Required

public bool? Required { get; set; }

Property Value

bool?

Requires

public string Requires { get; set; }

Property Value

string

Title

public string Title { get; set; }

Property Value

string

Transient

public bool? Transient { get; set; }

Property Value

bool?

Type

public JsonSchemaType? Type { get; set; }

Property Value

JsonSchemaType?

UniqueItems

public bool UniqueItems { get; set; }

Property Value

bool

Methods

Parse(string)

public static JsonSchema Parse(string json)

Parameters

json string

Returns

JsonSchema

Parse(string, JsonSchemaResolver)

public static JsonSchema Parse(string json, JsonSchemaResolver resolver)

Parameters

json string
resolver JsonSchemaResolver

Returns

JsonSchema

Read(JsonReader)

public static JsonSchema Read(JsonReader reader)

Parameters

reader JsonReader

Returns

JsonSchema

Read(JsonReader, JsonSchemaResolver)

public static JsonSchema Read(JsonReader reader, JsonSchemaResolver resolver)

Parameters

reader JsonReader
resolver JsonSchemaResolver

Returns

JsonSchema

ToString()

public override string ToString()

Returns

string

WriteTo(JsonWriter)

public void WriteTo(JsonWriter writer)

Parameters

writer JsonWriter

WriteTo(JsonWriter, JsonSchemaResolver)

public void WriteTo(JsonWriter writer, JsonSchemaResolver resolver)

Parameters

writer JsonWriter
resolver JsonSchemaResolver