RenameOptions.fromJson constructor
RenameOptions.fromJson(})
Implementation
factory RenameOptions.fromJson(
JsonDecoder jsonDecoder,
String jsonPath,
Object? json, {
ClientUriConverter? clientUriConverter,
}) {
json ??= {};
if (json is Map) {
String newName;
if (json.containsKey('newName')) {
newName = jsonDecoder.decodeString(
'$jsonPath.newName',
json['newName'],
);
} else {
throw jsonDecoder.mismatch(jsonPath, 'newName');
}
return RenameOptions(newName);
} else {
throw jsonDecoder.mismatch(jsonPath, 'rename options', json);
}
}