EditGetAssistsResult.fromJson constructor
EditGetAssistsResult.fromJson(
- JsonDecoder jsonDecoder,
- String jsonPath,
- Object? json
)
Implementation
factory EditGetAssistsResult.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
List<PrioritizedSourceChange> assists;
if (json.containsKey('assists')) {
assists = jsonDecoder.decodeList(
'$jsonPath.assists',
json['assists'],
(String jsonPath, Object? json) =>
PrioritizedSourceChange.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'assists');
}
return EditGetAssistsResult(assists);
} else {
throw jsonDecoder.mismatch(jsonPath, 'edit.getAssists result', json);
}
}