RenameFeedback.fromJson constructor
RenameFeedback.fromJson(})
Implementation
factory RenameFeedback.fromJson(
JsonDecoder jsonDecoder,
String jsonPath,
Object? json, {
ClientUriConverter? clientUriConverter,
}) {
json ??= {};
if (json is Map) {
int offset;
if (json.containsKey('offset')) {
offset = jsonDecoder.decodeInt('$jsonPath.offset', json['offset']);
} else {
throw jsonDecoder.mismatch(jsonPath, "'offset'", json);
}
int length;
if (json.containsKey('length')) {
length = jsonDecoder.decodeInt('$jsonPath.length', json['length']);
} else {
throw jsonDecoder.mismatch(jsonPath, "'length'", json);
}
String elementKindName;
if (json.containsKey('elementKindName')) {
elementKindName = jsonDecoder.decodeString(
'$jsonPath.elementKindName',
json['elementKindName'],
);
} else {
throw jsonDecoder.mismatch(jsonPath, "'elementKindName'", json);
}
String oldName;
if (json.containsKey('oldName')) {
oldName = jsonDecoder.decodeString(
'$jsonPath.oldName',
json['oldName'],
);
} else {
throw jsonDecoder.mismatch(jsonPath, "'oldName'", json);
}
return RenameFeedback(offset, length, elementKindName, oldName);
} else {
throw jsonDecoder.mismatch(jsonPath, "'rename feedback'", json);
}
}