Show / Hide Table of Contents

Class TypeKeyword

Defines the type JSON Schema keyword.

Inheritance
System.Object
TypeKeyword
Implements
IJsonSchemaKeyword
IJsonSerializable
System.IEquatable<IJsonSchemaKeyword>
System.IEquatable<TypeKeyword>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Manatee.Json.Schema
Assembly: Manatee.Json.dll
Syntax
public class TypeKeyword : IJsonSchemaKeyword, IJsonSerializable, IEquatable<IJsonSchemaKeyword>, IEquatable<TypeKeyword>

Constructors

| Improve this Doc View Source

TypeKeyword()

Used for deserialization.

Declaration
public TypeKeyword()
| Improve this Doc View Source

TypeKeyword(JsonSchemaType)

Creates an instance of the TypeKeyword.

Declaration
public TypeKeyword(JsonSchemaType type)
Parameters
Type Name Description
JsonSchemaType type

Properties

| Improve this Doc View Source

ErrorTemplate

Gets or sets the error message template.

Declaration
public static string ErrorTemplate { get; set; }
Property Value
Type Description
System.String
Remarks

Supports the following tokens:

  • actual
  • allowed
| Improve this Doc View Source

Name

Gets the name of the keyword.

Declaration
public string Name { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

SupportedVersions

Gets the versions (drafts) of JSON Schema which support this keyword.

Declaration
public JsonSchemaVersion SupportedVersions { get; }
Property Value
Type Description
JsonSchemaVersion
| Improve this Doc View Source

ValidationSequence

Gets the a value indicating the sequence in which this keyword will be evaluated.

Declaration
public int ValidationSequence { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Value

The schema value type for this keyword.

Declaration
public JsonSchemaType Value { get; }
Property Value
Type Description
JsonSchemaType
| Improve this Doc View Source

Vocabulary

Gets the vocabulary that defines this keyword.

Declaration
public SchemaVocabulary Vocabulary { get; }
Property Value
Type Description
SchemaVocabulary

Methods

| Improve this Doc View Source

Equals(Nullable<IJsonSchemaKeyword>)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(IJsonSchemaKeyword? other)
Parameters
Type Name Description
System.Nullable<IJsonSchemaKeyword> other

An object to compare with this object.

Returns
Type Description
System.Boolean

true if the current object is equal to the other parameter; otherwise, false.

| Improve this Doc View Source

Equals(Nullable<TypeKeyword>)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(TypeKeyword? other)
Parameters
Type Name Description
System.Nullable<TypeKeyword> other

An object to compare with this object.

Returns
Type Description
System.Boolean

true if the current object is equal to the other parameter; otherwise, false.

| Improve this Doc View Source

Equals(Nullable<Object>)

Determines whether the specified object is equal to the current object.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj

The object to compare with the current object.

Returns
Type Description
System.Boolean

true if the specified object is equal to the current object; otherwise, false.

| Improve this Doc View Source

FromJson(JsonValue, JsonSerializer)

Builds an object from a JsonValue.

Declaration
public void FromJson(JsonValue json, JsonSerializer serializer)
Parameters
Type Name Description
JsonValue json

The JsonValue representation of the object.

JsonSerializer serializer

The JsonSerializer instance to use for additional serialization of values.

| Improve this Doc View Source

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for the current object.

Overrides
System.Object.GetHashCode()
| Improve this Doc View Source

RegisterSubschemas(SchemaValidationContext)

Used register any subschemas during validation. Enables look-forward compatibility with $ref keywords.

Declaration
public void RegisterSubschemas(SchemaValidationContext context)
Parameters
Type Name Description
SchemaValidationContext context

The context object.

| Improve this Doc View Source

ResolveSubschema(JsonPointer, Uri, JsonSchemaVersion)

Resolves any subschemas during resolution of a $ref during validation.

Declaration
public JsonSchema? ResolveSubschema(JsonPointer pointer, Uri baseUri, JsonSchemaVersion supportedVersions)
Parameters
Type Name Description
JsonPointer pointer

A JsonPointer to the target schema.

System.Uri baseUri

The current base URI.

JsonSchemaVersion supportedVersions

Indicates the root schema's supported versions.

Returns
Type Description
System.Nullable<JsonSchema>

The referenced schema, if it exists; otherwise null.

| Improve this Doc View Source

ToJson(JsonSerializer)

Converts an object to a JsonValue.

Declaration
public JsonValue ToJson(JsonSerializer serializer)
Parameters
Type Name Description
JsonSerializer serializer

The JsonSerializer instance to use for additional serialization of values.

Returns
Type Description
JsonValue

The JsonValue representation of the object.

| Improve this Doc View Source

Validate(SchemaValidationContext)

Provides the validation logic for this keyword.

Declaration
public SchemaValidationResults Validate(SchemaValidationContext context)
Parameters
Type Name Description
SchemaValidationContext context

The context object.

Returns
Type Description
SchemaValidationResults

Results object containing a final result and any errors that may have been found.

Implements

IJsonSchemaKeyword
IJsonSerializable
System.IEquatable<T>
System.IEquatable<T>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX