encodeRawJson method
Implementation
String? encodeRawJson(dynamic rawJson) {
if (rawJson is Map<String, dynamic>) {
return (rawJson.isNotEmpty) ? json.encode(rawJson) : null;
} else if (rawJson is String) {
return rawJson.isNotEmpty ? rawJson : null;
} else {
return null;
}
}