formatJsonString static method
Formats a JSON string for better readability
@param json The JSON string to format @return The formatted JSON string or empty string if input is null/empty
Implementation
static String formatJsonString(String? json) {
try {
if (isNullOrEmpty(json)) return "";
return convertObjectToString(jsonDecode(json!));
} catch (ex, s) {
Completer().completeError(ex, s);
return json ?? '';
}
}