Click or drag to resize
Json.NET Schema

JSchema Class

 
An in-memory representation of a JSON Schema.
Inheritance Hierarchy
SystemObject
  Newtonsoft.Json.SchemaJSchema

Namespace:  Newtonsoft.Json.Schema
Assembly:  Newtonsoft.Json.Schema (in Newtonsoft.Json.Schema.dll) Version: 3.0.6
Syntax
C#
public class JSchema : IJsonLineInfo

The JSchema type exposes the following members.

Constructors
  NameDescription
Public methodJSchema
Initializes a new instance of the JSchema class.
Top
Properties
  NameDescription
Public propertyAdditionalItems
Gets or sets the JSchema for additional items.
Public propertyAdditionalProperties
Gets or sets the JSchema for additional properties.
Public propertyAllOf
Gets the AllOf schemas.
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 propertyAnyOf
Gets the AnyOf schemas.
Public propertyConst
Gets or sets the const value.
Public propertyContains
Gets the Contains schema.
Public propertyContentEncoding
Gets or sets the content encoding of a string.
Public propertyContentMediaType
Gets or sets the content media type of a string.
Public propertyDefault
Gets or sets the default value.
Public propertyDependencies
Gets the object property dependencies.
Public propertyDescription
Gets or sets the description of the schema.
Public propertyElse
Gets the Else schema.
Public propertyEnum
Gets the 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.
Public propertyExclusiveMinimum
Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute.
Public propertyExtensionData
Gets the extension data for the JSchema.
Public propertyFormat
Gets or sets the format.
Public propertyId
Gets or sets the schema ID.
Public propertyIf
Gets the If schema.
Public propertyItems
Gets the array item JSchemas.
Public propertyItemsPositionValidation
Gets or sets a value indicating whether items in an array are validated using the JSchema instance at their array position from Items.
Public propertyMaximum
Gets or sets the maximum value of a number.
Public propertyMaximumItems
Gets or sets the maximum number of array items.
Public propertyMaximumLength
Gets or sets the maximum length of a string.
Public propertyMaximumProperties
Gets or sets the maximum number of object properties.
Public propertyMinimum
Gets or sets the minimum value of a number.
Public propertyMinimumItems
Gets or sets the minimum number of array items.
Public propertyMinimumLength
Gets or sets the minimum length of a string.
Public propertyMinimumProperties
Gets or sets the minimum number of object properties.
Public propertyMultipleOf
Gets or sets the multiple of.
Public propertyNot
Gets the Not schema.
Public propertyOneOf
Gets the OneOf schemas.
Public propertyPattern
Gets or sets the pattern.
Public propertyPatternProperties
Gets the object pattern properties.
Public propertyProperties
Gets the object property JSchemas.
Public propertyPropertyNames
Gets the PropertyNames schema.
Public propertyReadOnly
Gets or sets a value that indicates whether the data is read only. Has no no effect on validation.
Public propertyReference
Gets or sets the $ref. This property is used when reading or writing referenced schemas without resolving them. Validating JSON with a schema that has a not null Reference value will error.
Public propertyRequired
Gets the required object properties.
Public propertySchemaVersion
Gets or sets the $schema. This value will only be read from JSON and written to JSON if the JSchema is the root schema.
Public propertyThen
Gets the Then schema.
Public propertyTitle
Gets or sets the title of the schema.
Public propertyType
Gets or sets the types of values allowed by the schema.
Public propertyUniqueItems
Gets or sets a flag indicating whether the array items must be unique.
Public propertyValid
Gets or sets a flag indicating whether this schema is true and always valid, or false and always invalid.
Public propertyValidators
Gets a JsonValidator collection that will be used during validation.
Public propertyWriteOnly
Gets or sets a value that indicates whether the data is write only. Has no no effect on validation.
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.)
Public methodStatic memberLoad(JsonReader)
Loads a JSchema from the specified JsonReader.
Public methodStatic memberLoad(JsonReader, JSchemaReaderSettings)
Loads a JSchema from a JsonReader using the given JSchemaResolver.
Public methodStatic memberLoad(JsonReader, JSchemaResolver)
Loads a JSchema from a JsonReader using the given JSchemaResolver.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberParse(String)
Load a JSchema from a string that contains schema JSON.
Public methodStatic memberParse(String, JSchemaReaderSettings)
Load a JSchema from a string that contains schema JSON using the given JSchemaReaderSettings.
Public methodStatic memberParse(String, JSchemaResolver)
Load a JSchema from a string that contains schema JSON using the given JSchemaResolver.
Public methodToString
Returns the JSON for this schema.
(Overrides ObjectToString.)
Public methodToString(SchemaVersion)
Returns the JSON for this schema using the specified SchemaVersion.
Public methodWriteTo(JsonWriter)
Writes this schema to a JsonWriter.
Public methodWriteTo(JsonWriter, JSchemaWriterSettings)
Writes this schema to a JsonWriter using the specified JSchemaResolver.
Top
Operators
See Also