Search Results for

    Show / Hide Table of Contents

    Class ResponseConverter<T>

    Generic JSON converter for serializing request objects.

    Inheritance
    object
    JsonConverter
    JsonConverter<T>
    ResponseConverter<T>
    TypedResponseConverter<T>
    Inherited Members
    JsonConverter<T>.WriteJson(JsonWriter, object, JsonSerializer)
    JsonConverter<T>.ReadJson(JsonReader, Type, object, JsonSerializer)
    JsonConverter<T>.CanConvert(Type)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.IO.Json
    Assembly: Glitch9.IO.dll
    Syntax
    public abstract class ResponseConverter<T> : JsonConverter<T>
    Type Parameters
    Name Description
    T

    Properties

    | Edit this page View Source

    CanRead

    Gets a value indicating whether this Newtonsoft.Json.JsonConverter can read JSON.

    Declaration
    public override bool CanRead { get; }
    Property Value
    Type Description
    bool

    true if this Newtonsoft.Json.JsonConverter can read JSON; otherwise, false.

    Overrides
    Newtonsoft.Json.JsonConverter.CanRead
    | Edit this page View Source

    CanWrite

    Gets a value indicating whether this Newtonsoft.Json.JsonConverter can write JSON.

    Declaration
    public override sealed bool CanWrite { get; }
    Property Value
    Type Description
    bool

    true if this Newtonsoft.Json.JsonConverter can write JSON; otherwise, false.

    Overrides
    Newtonsoft.Json.JsonConverter.CanWrite

    Methods

    | Edit this page View Source

    FromJson(JsonReader, JsonSerializer)

    Declaration
    protected abstract T FromJson(JsonReader reader, JsonSerializer serializer)
    Parameters
    Type Name Description
    JsonReader reader
    JsonSerializer serializer
    Returns
    Type Description
    T
    | Edit this page View Source

    ReadJson(JsonReader, Type, T, bool, JsonSerializer)

    Reads the JSON representation of the object.

    Declaration
    public override sealed T ReadJson(JsonReader reader, Type objectType, T existingValue, bool hasExistingValue, JsonSerializer serializer)
    Parameters
    Type Name Description
    JsonReader reader

    The Newtonsoft.Json.JsonReader to read from.

    Type objectType

    Type of the object.

    T existingValue

    The existing value of object being read. If there is no existing value then null will be used.

    bool hasExistingValue

    The existing value has a value.

    JsonSerializer serializer

    The calling serializer.

    Returns
    Type Description
    T

    The object value.

    Overrides
    JsonConverter<T>.ReadJson(JsonReader, Type, T, bool, JsonSerializer)
    | Edit this page View Source

    WriteJson(JsonWriter, T, JsonSerializer)

    Writes the JSON representation of the object.

    Declaration
    public override sealed void WriteJson(JsonWriter writer, T value, JsonSerializer serializer)
    Parameters
    Type Name Description
    JsonWriter writer

    The Newtonsoft.Json.JsonWriter to write to.

    T value

    The value.

    JsonSerializer serializer

    The calling serializer.

    Overrides
    Newtonsoft.Json.JsonConverter<T>.WriteJson(Newtonsoft.Json.JsonWriter, T, Newtonsoft.Json.JsonSerializer)

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation