Class DynamoSerializer
The Dynamo
- Numberint, int?, long, long?, double, double?, decimal, decimal?, DateTimeOffset, DateTimeOffset?
- Stringstring, enum
- Binarybyte[]
- Booleanbool, bool?
- Nullany nullable type
- ListList<T>
- MapDictionary<string, object>, Dictionary<string, T>, T
- String SetISet<string>
- Number SetISet<int>, ISet<long>, ISet<double>, ISet<decimal>
- Binary SetISet<byte[]>
Inheritance
Namespace: LambdaSharp.DynamoDB.Serialization
Assembly: LambdaSharp.DynamoDB.Serialization.dll
Syntax
public static class DynamoSerializer
Methods
Deserialize(AttributeValue, Type)
The Deserialize(AttributetargetType
instance using the default Dynamo
Declaration
public static object Deserialize(AttributeValue attribute, Type targetType)
Parameters
Type | Name | Description |
---|---|---|
Amazon. |
attribute | The DynamoDB attribute value to deserialize. |
System. |
targetType | The type to deserialize into. |
Returns
Type | Description |
---|---|
System. |
An instance of |
Deserialize(AttributeValue, Type, DynamoSerializerOptions)
The Deserialize(AttributetargetType
instance.
Declaration
public static object Deserialize(AttributeValue attribute, Type targetType, DynamoSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Amazon. |
attribute | The DynamoDB attribute value to deserialize. |
System. |
targetType | The type to deserialize into. |
Dynamo |
options | The deserialization options to use. |
Returns
Type | Description |
---|---|
System. |
An instance of |
Deserialize(Dictionary<String, AttributeValue>, Type)
The Deserialize(Dictionary<String, AttributeValue>, Type) method deserializes a DynamoDB document into a targetType
instance using the default Dynamo
Declaration
public static object Deserialize(Dictionary<string, AttributeValue> document, Type targetType)
Parameters
Type | Name | Description |
---|---|---|
System. |
document | The DynamoDB document to deserialize. |
System. |
targetType | The type to deserialize into. |
Returns
Type | Description |
---|---|
System. |
An instance of |
Deserialize(Dictionary<String, AttributeValue>, Type, DynamoSerializerOptions)
The Deserialize(Dictionary<String, AttributeValue>, Type, DynamoSerializerOptions) method deserializes a DynamoDB document into a targetType
instance.
Declaration
public static object Deserialize(Dictionary<string, AttributeValue> document, Type targetType, DynamoSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
System. |
document | The DynamoDB document to deserialize. |
System. |
targetType | The type to deserialize into. |
Dynamo |
options | The deserialization options to use. |
Returns
Type | Description |
---|---|
System. |
An instance of |
Deserialize<TRecord>(Dictionary<String, AttributeValue>)
The Deserialize<TRecord>(Dictionary<String, AttributeValue>) method deserializes a DynamoDB document into a TRecord
instance using the default Dynamo
Declaration
public static TRecord Deserialize<TRecord>(Dictionary<string, AttributeValue> document)
where TRecord : class
Parameters
Type | Name | Description |
---|---|---|
System. |
document | The DynamoDB document to deserialize. |
Returns
Type | Description |
---|---|
TRecord | An instance of |
Type Parameters
Name | Description |
---|---|
TRecord | The type to deserialize into. |
Deserialize<TRecord>(Dictionary<String, AttributeValue>, DynamoSerializerOptions)
The Deserialize<TRecord>(Dictionary<String, AttributeValue>, DynamoSerializerOptions) method deserializes a DynamoDB document into a TRecord
instance.
Declaration
public static TRecord Deserialize<TRecord>(Dictionary<string, AttributeValue> document, DynamoSerializerOptions options)
where TRecord : class
Parameters
Type | Name | Description |
---|---|---|
System. |
document | The DynamoDB document to deserialize. |
Dynamo |
options | The deserialization options to use. |
Returns
Type | Description |
---|---|
TRecord | An instance of |
Type Parameters
Name | Description |
---|---|
TRecord | The type to deserialize into. |
Serialize(Object)
The Serialize(Object) method serializes an object to a DynamoDB attribute value using the default Dynamo
Declaration
public static AttributeValue Serialize(object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Returns
Type | Description |
---|---|
Amazon. |
A DynamoDB attribute value or |
Serialize(Object, DynamoSerializerOptions)
The Serialize(Object, Dynamo
Declaration
public static AttributeValue Serialize(object value, DynamoSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The object to serialize. |
Dynamo |
options | The serialization options to use. |
Returns
Type | Description |
---|---|
Amazon. |
A DynamoDB attribute value or |