ToJson() public static method

Creates JSON text for a given Document
public static ToJson ( Document document, bool prettyPrint ) : string
document Document
prettyPrint bool
return string
 /// <summary>
 /// <para>
 /// Converts the current Document into a matching pretty JSON string.
 /// </para>
 /// <para>
 /// 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
 /// </para>
 /// <para>
 /// 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.
 /// </para>
 /// </summary>
 /// <returns>JSON string corresponding to the current Document.</returns>
 public string ToJsonPretty()
 {
     return(JsonUtils.ToJson(this, prettyPrint: true));
 }
 /// <summary>
 /// <para>
 /// Converts the current Document into a matching JSON string.
 /// </para>
 /// <para>
 /// 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
 /// </para>
 /// <para>
 /// 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.
 /// </para>
 /// </summary>
 /// <returns>JSON string corresponding to the current Document.</returns>
 public string ToJson()
 {
     return(JsonUtils.ToJson(this, prettyPrint: false));
 }