C# Класс Newtonsoft.Json.JsonValidatingReader

Represents a reader that provides JsonSchema validation.
Наследование: JsonReader, IJsonLineInfo
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
FloatingPointRemainder double
GetCurrentNodeSchemaType JsonSchemaType?
IJsonLineInfo bool
IsPropertyDefinied bool
IsZero bool
OnValidationEvent void
Pop SchemaScope
ProcessValue void
Push void
RaiseError void
TestType bool
ValidateArray bool
ValidateBoolean void
ValidateCurrentToken void
ValidateEndArray void
ValidateEndObject void
ValidateFloat void
ValidateInteger void
ValidateNotDisallowed void
ValidateNull void
ValidateObject bool
ValidatePropertyName void
ValidateString void
WriteToken void

Открытые методы

Метод Описание
JsonValidatingReader ( JsonReader reader ) : System

Initializes a new instance of the JsonValidatingReader class that validates the content returned from the given JsonReader.

Read ( ) : bool

Reads the next JSON token from the stream.

ReadAsBoolean ( ) : bool?

Reads the next JSON token from the stream as a Nullable{T} of Boolean.

ReadAsBytes ( ) : byte[]

Reads the next JSON token from the stream as a Byte[].

ReadAsDateTime ( ) : DateTime?

Reads the next JSON token from the stream as a Nullable{T} of DateTime.

ReadAsDateTimeOffset ( ) : DateTimeOffset?

Reads the next JSON token from the stream as a Nullable{T} of DateTimeOffset.

ReadAsDecimal ( ) : decimal?

Reads the next JSON token from the stream as a Nullable{T} of Decimal.

ReadAsDouble ( ) : double?

Reads the next JSON token from the stream as a Nullable{T} of Double.

ReadAsInt32 ( ) : int?

Reads the next JSON token from the stream as a Nullable{T} of Int32.

ReadAsString ( ) : string

Reads the next JSON token from the stream as a String.

Приватные методы

Метод Описание
FloatingPointRemainder ( double dividend, double divisor ) : double
GetCurrentNodeSchemaType ( ) : JsonSchemaType?
IJsonLineInfo ( ) : bool
IsPropertyDefinied ( JsonSchemaModel schema, string propertyName ) : bool
IsZero ( double value ) : bool
OnValidationEvent ( JsonSchemaException exception ) : void
Pop ( ) : SchemaScope
ProcessValue ( ) : void
Push ( SchemaScope scope ) : void
RaiseError ( string message, JsonSchemaModel schema ) : void
TestType ( JsonSchemaModel currentSchema, JsonSchemaType currentType ) : bool
ValidateArray ( JsonSchemaModel schema ) : bool
ValidateBoolean ( JsonSchemaModel schema ) : void
ValidateCurrentToken ( ) : void
ValidateEndArray ( JsonSchemaModel schema ) : void
ValidateEndObject ( JsonSchemaModel schema ) : void
ValidateFloat ( JsonSchemaModel schema ) : void
ValidateInteger ( JsonSchemaModel schema ) : void
ValidateNotDisallowed ( JsonSchemaModel schema ) : void
ValidateNull ( JsonSchemaModel schema ) : void
ValidateObject ( JsonSchemaModel schema ) : bool
ValidatePropertyName ( JsonSchemaModel schema ) : void
ValidateString ( JsonSchemaModel schema ) : void
WriteToken ( IList schemas ) : void

Описание методов

JsonValidatingReader() публичный Метод

Initializes a new instance of the JsonValidatingReader class that validates the content returned from the given JsonReader.
public JsonValidatingReader ( JsonReader reader ) : System
reader JsonReader The to read from while validating.
Результат System

Read() публичный Метод

Reads the next JSON token from the stream.
public Read ( ) : bool
Результат bool

ReadAsBoolean() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of Boolean.
public ReadAsBoolean ( ) : bool?
Результат bool?

ReadAsBytes() публичный Метод

Reads the next JSON token from the stream as a Byte[].
public ReadAsBytes ( ) : byte[]
Результат byte[]

ReadAsDateTime() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of DateTime.
public ReadAsDateTime ( ) : DateTime?
Результат DateTime?

ReadAsDateTimeOffset() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of DateTimeOffset.
public ReadAsDateTimeOffset ( ) : DateTimeOffset?
Результат DateTimeOffset?

ReadAsDecimal() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of Decimal.
public ReadAsDecimal ( ) : decimal?
Результат decimal?

ReadAsDouble() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of Double.
public ReadAsDouble ( ) : double?
Результат double?

ReadAsInt32() публичный Метод

Reads the next JSON token from the stream as a Nullable{T} of Int32.
public ReadAsInt32 ( ) : int?
Результат int?

ReadAsString() публичный Метод

Reads the next JSON token from the stream as a String.
public ReadAsString ( ) : string
Результат string