Class DocumentExtensions
- Namespace
- Amazon.DynamoDBv2.DocumentModel
- Assembly
- AWSSDK.DynamoDBv2.dll
public static class DocumentExtensions
- Inheritance
-
DocumentExtensions
- Inherited Members
Methods
ToJson(IEnumerable<Document>)
Converts the current IEnumerable<T> of Document into a matching JSON string.
DynamoDB types are a superset of JSON types, thus the following DynamoDB cannot be properly represented as JSON data: PrimitiveList (SS, NS, BS types) - these sets will be converted to JSON arrays Binary Primitive (B type) - binary data will be converted to Base64 strings
If the resultant JSON is passed to Document.FromJson, the binary values will be treated as Base64 strings. Invoke Document.DecodeBase64Attributes to decode these strings into binary data.
public static string ToJson(this IEnumerable<Document> documents)
Parameters
documents
IEnumerable<Document>
Returns
- string
JSON string corresponding to the current IEnumerable<T>.
ToJsonPretty(IEnumerable<Document>)
Converts the current IEnumerable<T> of Document into a matching pretty JSON string.
DynamoDB types are a superset of JSON types, thus the following DynamoDB cannot be properly represented as JSON data: PrimitiveList (SS, NS, BS types) - these sets will be converted to JSON arrays Binary Primitive (B type) - binary data will be converted to Base64 strings
If the resultant JSON is passed to Document.FromJson, the binary values will be treated as Base64 strings. Invoke Document.DecodeBase64Attributes to decode these strings into binary data.
public static string ToJsonPretty(this IEnumerable<Document> documents)
Parameters
documents
IEnumerable<Document>
Returns
- string
JSON string corresponding to the current IEnumerable<T>.