jsonBody static method
Implementation
static String jsonBody({
/// message content.
required String message,
/// message attributes
required Map<String, String> attributes,
}) {
if (attributes.isEmpty) {
return message;
}
/// {'msg':'xxx', 'attrs':''}
return jsonEncode({
messageKey: message,
attributesKey: attributes,
});
}