Class GristRecordSerializer<T>
Parses Grist JSON records and binds them to the properties of a POCO.
Inherited Members
Namespace: Grist4NET
Assembly: Grist4NET.dll
Syntax
public static class GristRecordSerializer<T>
Type Parameters
| Name | Description |
|---|---|
| T | Type that properties will be bound to |
Methods
CanDeserialize(GristTable, bool)
Tests if a particular table can be deserialized into the properties of a particular type
Declaration
public static bool CanDeserialize(GristTable table, bool throwOnIncompatible = false)
Parameters
| Type | Name | Description |
|---|---|---|
| GristTable | table | The columns that will be checked |
| bool | throwOnIncompatible | If true, this method will throw when deserialization would fail |
Returns
| Type | Description |
|---|---|
| bool |
Deserialize(IDictionary<string, object?>, T)
Attempt to deserialize the fields of a Grist record into a given DTO Automatically handles unwrapping, parsing, and conversion
Declaration
public static void Deserialize(IDictionary<string, object?> fields, T instance)
Parameters
| Type | Name | Description |
|---|---|---|
| IDictionary<string, object> | fields | |
| T | instance |