WebScraperError.fromJson constructor
WebScraperError.fromJson(
- String json
Creates a WebScraperError instance from a JSON string.
This factory constructor is used for deserializing error data from JSON strings.
Parameters:
json
: JSON string containing error message
Returns:
- New WebScraperError instance with message from the JSON
Throws:
- FormatException if the JSON is invalid
Implementation
factory WebScraperError.fromJson(String json) {
return WebScraperError.fromMap(jsonDecode(json));
}