fromJson method
Converts the object from a JSON string representation.
Returns the object from the JSON string representation.
Implementation
R fromJson(String json) {
final Object? decodedJson = SafeParser.safeDecodeJson(json);
if (decodedJson is Map<String, dynamic>) {
return fromMap(decodedJson);
} else {
throw FormatException('Invalid JSON format: $json');
}
}