Class ResponseConverter<T>
Generic JSON converter for serializing request objects.
Inherited Members
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 SourceCanRead
Gets a value indicating whether this Newtonsoft.Json.JsonConverter can read JSON.
Declaration
public override bool CanRead { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Overrides
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 |
|
Overrides
Methods
| Edit this page View SourceFromJson(JsonReader, JsonSerializer)
Declaration
protected abstract T FromJson(JsonReader reader, JsonSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonReader | reader | |
| JsonSerializer | serializer |
Returns
| Type | Description |
|---|---|
| T |
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 |
| bool | hasExistingValue | The existing value has a value. |
| JsonSerializer | serializer | The calling serializer. |
Returns
| Type | Description |
|---|---|
| T | The object value. |
Overrides
| Edit this page View SourceWriteJson(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. |