toJson method

dynamic toJson()

Implementation

dynamic toJson() {
  if (data is String) {
    return json.decode(data);
  }

  return data;
}