toJson method

Map<String, dynamic> toJson()

Implementation

@visibleForTesting
Map<String, dynamic> toJson() {
  Map<String, dynamic> result = {
    "binaryData": base64Encode(binaryData),
    "resourceType": resourceType.value
  };

  if (privateKey != null) result["privateKey"] = base64Encode(privateKey!);

  return result;
}