toJson method
Converts the Data instance to a JSON string.
This method is used for serializing the data to JSON format.
Returns:
- JSON string containing URL and data content
Implementation
String toJson() {
return jsonEncode(toMap());
}
Converts the Data instance to a JSON string.
This method is used for serializing the data to JSON format.
Returns:
String toJson() {
return jsonEncode(toMap());
}