toJson method

String toJson()

Convert to JSON string

Implementation

String toJson() {
  if (data == null) return '';
  return jsonEncode(data);
}