JSchema Class |
Namespace: Newtonsoft.Json.Schema
public class JSchema : IJsonLineInfo
The JSchema type exposes the following members.
Name | Description | |
---|---|---|
AdditionalItems |
Gets or sets the JSchema for additional items.
| |
AdditionalProperties |
Gets or sets the JSchema for additional properties.
| |
AllOf |
Gets the AllOf schemas.
| |
AllowAdditionalItems |
Gets or sets a value indicating whether additional items are allowed.
| |
AllowAdditionalProperties |
Gets or sets a value indicating whether additional properties are allowed.
| |
AnyOf |
Gets the AnyOf schemas.
| |
Const |
Gets or sets the const value.
| |
Contains |
Gets the Contains schema.
| |
ContentEncoding |
Gets or sets the content encoding of a string.
| |
ContentMediaType |
Gets or sets the content media type of a string.
| |
Default |
Gets or sets the default value.
| |
Dependencies |
Gets the object property dependencies.
| |
Description |
Gets or sets the description of the schema.
| |
Else |
Gets the Else schema.
| |
Enum |
Gets the collection of valid enum values allowed.
| |
ExclusiveMaximum |
Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute.
| |
ExclusiveMinimum |
Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute.
| |
ExtensionData |
Gets the extension data for the JSchema.
| |
Format |
Gets or sets the format.
| |
Id |
Gets or sets the schema ID.
| |
If |
Gets the If schema.
| |
Items |
Gets the array item JSchemas.
| |
ItemsPositionValidation |
Gets or sets a value indicating whether items in an array are validated using the JSchema instance at their array position from Items.
| |
Maximum |
Gets or sets the maximum value of a number.
| |
MaximumItems |
Gets or sets the maximum number of array items.
| |
MaximumLength |
Gets or sets the maximum length of a string.
| |
MaximumProperties |
Gets or sets the maximum number of object properties.
| |
Minimum |
Gets or sets the minimum value of a number.
| |
MinimumItems |
Gets or sets the minimum number of array items.
| |
MinimumLength |
Gets or sets the minimum length of a string.
| |
MinimumProperties |
Gets or sets the minimum number of object properties.
| |
MultipleOf |
Gets or sets the multiple of.
| |
Not |
Gets the Not schema.
| |
OneOf |
Gets the OneOf schemas.
| |
Pattern |
Gets or sets the pattern.
| |
PatternProperties |
Gets the object pattern properties.
| |
Properties |
Gets the object property JSchemas.
| |
PropertyNames |
Gets the PropertyNames schema.
| |
ReadOnly |
Gets or sets a value that indicates whether the data is read only.
Has no no effect on validation.
| |
Reference |
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.
| |
Required |
Gets the required object properties.
| |
SchemaVersion |
Gets or sets the $schema. This value will only be read from JSON and written to JSON if the JSchema is the root schema.
| |
Then |
Gets the Then schema.
| |
Title |
Gets or sets the title of the schema.
| |
Type |
Gets or sets the types of values allowed by the schema.
| |
UniqueItems |
Gets or sets a flag indicating whether the array items must be unique.
| |
Valid |
Gets or sets a flag indicating whether this schema is true and always valid, or false and always invalid.
| |
Validators |
Gets a JsonValidator collection that will be used during validation.
| |
WriteOnly |
Gets or sets a value that indicates whether the data is write only.
Has no no effect on validation.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Load(JsonReader) |
Loads a JSchema from the specified JsonReader.
| |
Load(JsonReader, JSchemaReaderSettings) | ||
Load(JsonReader, JSchemaResolver) | ||
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Parse(String) |
Load a JSchema from a string that contains schema JSON.
| |
Parse(String, JSchemaReaderSettings) |
Load a JSchema from a string that contains schema JSON using the given JSchemaReaderSettings.
| |
Parse(String, JSchemaResolver) |
Load a JSchema from a string that contains schema JSON using the given JSchemaResolver.
| |
ToString |
Returns the JSON for this schema.
(Overrides ObjectToString.) | |
ToString(SchemaVersion) |
Returns the JSON for this schema using the specified SchemaVersion.
| |
WriteTo(JsonWriter) |
Writes this schema to a JsonWriter.
| |
WriteTo(JsonWriter, JSchemaWriterSettings) |
Writes this schema to a JsonWriter using the specified JSchemaResolver.
|
Name | Description | |
---|---|---|
(JToken to JSchema) |
Gets the JSchema associated with the JToken.
| |
(JSchema to JToken) |
Gets a JToken associated with the JSchema.
|