fromJson static method
Implementation
static Locator? fromJson(Map<String, dynamic>? json) {
String? href = json?.optNullableString("href");
String? type = json?.optNullableString("type");
if (href == null || type == null) {
Fimber.i("[href] and [type] are required $json");
return null;
}
return Locator(
href: href,
type: type,
title: json.optNullableString("title"),
locations: Locations.fromJson(json.optJSONObject("locations")),
text: LocatorText.fromJson(json.optJSONObject("text")));
}