LinkedEditSuggestion.fromJson constructor
LinkedEditSuggestion.fromJson(})
Implementation
factory LinkedEditSuggestion.fromJson(
JsonDecoder jsonDecoder,
String jsonPath,
Object? json, {
ClientUriConverter? clientUriConverter,
}) {
json ??= {};
if (json is Map) {
String value;
if (json.containsKey('value')) {
value = jsonDecoder.decodeString('$jsonPath.value', json['value']);
} else {
throw jsonDecoder.mismatch(jsonPath, "'value'", json);
}
LinkedEditSuggestionKind kind;
if (json.containsKey('kind')) {
kind = LinkedEditSuggestionKind.fromJson(
jsonDecoder,
'$jsonPath.kind',
json['kind'],
clientUriConverter: clientUriConverter,
);
} else {
throw jsonDecoder.mismatch(jsonPath, "'kind'", json);
}
return LinkedEditSuggestion(value, kind);
} else {
throw jsonDecoder.mismatch(jsonPath, "'LinkedEditSuggestion'", json);
}
}