String toJsonString({int? maxBodyChars}) { return const JsonEncoder.withIndent( ' ', ).convert(toMap(maxBodyChars: maxBodyChars)); }