<PackageReference Include="Newtonsoft.Json" Version="5.0.4" />

JsonSchema

public class JsonSchema
An in-memory representation of a JSON Schema.
public JsonSchema AdditionalItems { get; set; }

Gets or sets the JsonSchema of additional items.

public JsonSchema AdditionalProperties { get; set; }

Gets or sets the JsonSchema of additional properties.

public bool AllowAdditionalItems { get; set; }

Gets or sets a value indicating whether additional items are allowed.

public bool AllowAdditionalProperties { get; set; }

Gets or sets a value indicating whether additional properties are allowed.

public JToken Default { get; set; }

Gets or sets the default value.

public string Description { get; set; }

Gets or sets the description of the object.

public JsonSchemaType? Disallow { get; set; }

Gets or sets disallowed types.

public double? DivisibleBy { get; set; }

Gets or sets a number that the value should be divisble by.

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

Gets or sets the a collection of valid enum values allowed.

public bool? ExclusiveMaximum { get; set; }

Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute.

public bool? ExclusiveMinimum { get; set; }

Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute.

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

Gets or sets the collection of JsonSchema that this schema extends.

public string Format { get; set; }

Gets or sets the format.

public bool? Hidden { get; set; }

Gets or sets whether the object is visible to users.

public string Id { get; set; }

Gets or sets the id.

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

Gets or sets the JsonSchema of items.

public double? Maximum { get; set; }

Gets or sets the maximum.

public int? MaximumItems { get; set; }

Gets or sets the maximum number of items.

public int? MaximumLength { get; set; }

Gets or sets the maximum length.

public double? Minimum { get; set; }

Gets or sets the minimum.

public int? MinimumItems { get; set; }

Gets or sets the minimum number of items.

public int? MinimumLength { get; set; }

Gets or sets the minimum length.

public string Pattern { get; set; }

Gets or sets the pattern.

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

Gets or sets the pattern properties.

public bool PositionalItemsValidation { get; set; }

Gets or sets a value indicating whether items in an array are validated using the JsonSchema instance at their array position from Items.

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

Gets or sets the JsonSchema of properties.

public bool? ReadOnly { get; set; }

Gets or sets whether the object is read only.

public bool? Required { get; set; }

Gets or sets whether the object is required.

public string Requires { get; set; }

Gets or sets the required property if this property is present.

public string Title { get; set; }

Gets or sets the title.

public bool? Transient { get; set; }

Gets or sets whether the object is transient.

public JsonSchemaType? Type { get; set; }

Gets or sets the types of values allowed by the object.

public bool UniqueItems { get; set; }

Gets or sets whether the array items must be unique.

public JsonSchema()

Initializes a new instance of the JsonSchema class.

public static JsonSchema Parse(string json)

Load a JsonSchema from a string that contains schema JSON.

public static JsonSchema Parse(string json, JsonSchemaResolver resolver)

Parses the specified json.

public static JsonSchema Read(JsonReader reader)

Reads a JsonSchema from the specified JsonReader.

public static JsonSchema Read(JsonReader reader, JsonSchemaResolver resolver)

Reads a JsonSchema from the specified JsonReader.

public void WriteTo(JsonWriter writer)

Writes this schema to a JsonWriter.

public void WriteTo(JsonWriter writer, JsonSchemaResolver resolver)

Writes this schema to a JsonWriter using the specified JsonSchemaResolver.