toJson method

String toJson()

List to JSON usingjson.encode

Implementation

String toJson() {
  String data = defaultString;
  try {
    data = json.encode(this);
  } on Exception catch (e, s) {
    errorLogsNS("ERROR in getJson", e, s);
  }
  return data;
}