toJson method
The JSON representation of the KhaltiRequestModel
.
Enabling beautify
will prettify the JSON.
Implementation
String toJson({bool beautify = false}) {
if (beautify) return const JsonEncoder.withIndent(' ').convert(toMap());
return jsonEncode(toMap());
}