Click or drag to resize
Json.NET

JsonSchema Class

 

Note: This API is now obsolete.

An in-memory representation of a JSON Schema.

Caution note Caution
JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
Inheritance Hierarchy
SystemObject
  Newtonsoft.Json.SchemaJsonSchema

Namespace:  Newtonsoft.Json.Schema
Assembly:  Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntax
C#
[ObsoleteAttribute("JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.")]
public class JsonSchema

The JsonSchema type exposes the following members.

Constructors
  NameDescription
Public methodJsonSchema
Initializes a new instance of the JsonSchema class.
Top
Properties
  NameDescription
Public propertyAdditionalItems
Gets or sets the JsonSchema of additional items.
Public propertyAdditionalProperties
Gets or sets the JsonSchema of additional properties.
Public propertyAllowAdditionalItems
Gets or sets a value indicating whether additional items are allowed.
Public propertyAllowAdditionalProperties
Gets or sets a value indicating whether additional properties are allowed.
Public propertyDefault
Gets or sets the default value.
Public propertyDescription
Gets or sets the description of the object.
Public propertyDisallow
Gets or sets disallowed types.
Public propertyDivisibleBy
Gets or sets a number that the value should be divisible by.
Public propertyEnum
Gets or sets the a collection of valid enum values allowed.
Public propertyExclusiveMaximum
Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute (Maximum).
Public propertyExclusiveMinimum
Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute (Minimum).
Public propertyExtends
Gets or sets the collection of JsonSchema that this schema extends.
Public propertyFormat
Gets or sets the format.
Public propertyHidden
Gets or sets whether the object is visible to users.
Public propertyId
Gets or sets the id.
Public propertyItems
Gets or sets the JsonSchema of items.
Public propertyMaximum
Gets or sets the maximum.
Public propertyMaximumItems
Gets or sets the maximum number of items.
Public propertyMaximumLength
Gets or sets the maximum length.
Public propertyMinimum
Gets or sets the minimum.
Public propertyMinimumItems
Gets or sets the minimum number of items.
Public propertyMinimumLength
Gets or sets the minimum length.
Public propertyPattern
Gets or sets the pattern.
Public propertyPatternProperties
Gets or sets the pattern properties.
Public propertyPositionalItemsValidation
Gets or sets a value indicating whether items in an array are validated using the JsonSchema instance at their array position from Items.
Public propertyProperties
Gets or sets the JsonSchema of properties.
Public propertyReadOnly
Gets or sets whether the object is read-only.
Public propertyRequired
Gets or sets whether the object is required.
Public propertyRequires
Gets or sets the required property if this property is present.
Public propertyTitle
Gets or sets the title.
Public propertyTransient
Gets or sets whether the object is transient.
Public propertyType
Gets or sets the types of values allowed by the object.
Public propertyUniqueItems
Gets or sets whether the array items must be unique.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberParse(String)
Load a JsonSchema from a string that contains JSON Schema.
Public methodStatic memberParse(String, JsonSchemaResolver)
Load a JsonSchema from a string that contains JSON Schema using the specified JsonSchemaResolver.
Public methodStatic memberRead(JsonReader)
Reads a JsonSchema from the specified JsonReader.
Public methodStatic memberRead(JsonReader, JsonSchemaResolver)
Reads a JsonSchema from the specified JsonReader.
Public methodToString
Returns a String that represents the current Object.
(Overrides ObjectToString.)
Public methodWriteTo(JsonWriter)
Writes this schema to a JsonWriter.
Public methodWriteTo(JsonWriter, JsonSchemaResolver)
Writes this schema to a JsonWriter using the specified JsonSchemaResolver.
Top
See Also