toJson method

String toJson({
  1. bool beautify = false,
})
inherited

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());
}