DataTableConverter Class
Namespace: Stimulsoft.Base.Json.Converters
Converts a DataTable to and from JSON.
Inheritance
Inherits from: JsonConverter
Methods
| Method | Returns | Description |
|---|---|---|
| CanConvert | bool | Determines whether this instance can convert the specified value type. |
| ReadJson | object | Reads the JSON representation of the object. |
| WriteJson | void | Writes the JSON representation of the object. |
Method Details
CanConvert
CanConvert(valueType: Type): bool
Determines whether this instance can convert the specified value type.
Parameters
- valueType (Type) — Type of the value.
Returns bool — true if this instance can convert the specified value type; otherwise, false.
ReadJson
ReadJson(reader: JsonReader, objectType: Type, existingValue: object, serializer: JsonSerializer): object
Reads the JSON representation of the object.
Parameters
- reader (JsonReader) — The JsonReader to read from.
- objectType (Type) — Type of the object.
- existingValue (object) — The existing value of object being read.
- serializer (JsonSerializer) — The calling serializer.
Returns object — The object value.
WriteJson
WriteJson(writer: JsonWriter, value: object, serializer: JsonSerializer): void
Writes the JSON representation of the object.
Parameters
- writer (JsonWriter) — The JsonWriter to write to.
- value (object) — The value.
- serializer (JsonSerializer) — The calling serializer.