AnalysisHandleWatchEventsParams.fromJson constructor
AnalysisHandleWatchEventsParams.fromJson(})
Implementation
factory AnalysisHandleWatchEventsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json,
{ClientUriConverter? clientUriConverter}) {
json ??= {};
if (json is Map) {
List<WatchEvent> events;
if (json.containsKey('events')) {
events = jsonDecoder.decodeList(
'$jsonPath.events',
json['events'],
(String jsonPath, Object? json) => WatchEvent.fromJson(
jsonDecoder, jsonPath, json,
clientUriConverter: clientUriConverter));
} else {
throw jsonDecoder.mismatch(jsonPath, 'events');
}
return AnalysisHandleWatchEventsParams(events);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'analysis.handleWatchEvents params', json);
}
}