toJsonString method
Returns a JSON string representation of the BaseModel.
Implementation
String toJsonString() {
try {
final encoder = const JsonEncoder.withIndent(' ');
return encoder.convert(sortedJson());
} catch (e) {
return '{"e": "${e.safeToString()}"}';
}
}