ExecutionSetSubscriptionsParams.fromJson constructor
ExecutionSetSubscriptionsParams.fromJson(
- JsonDecoder jsonDecoder,
- String jsonPath,
- Object? json
)
Implementation
factory ExecutionSetSubscriptionsParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
List<ExecutionService> subscriptions;
if (json.containsKey('subscriptions')) {
subscriptions = jsonDecoder.decodeList(
'$jsonPath.subscriptions',
json['subscriptions'],
(String jsonPath, Object? json) =>
ExecutionService.fromJson(jsonDecoder, jsonPath, json));
} else {
throw jsonDecoder.mismatch(jsonPath, 'subscriptions');
}
return ExecutionSetSubscriptionsParams(subscriptions);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'execution.setSubscriptions params', json);
}
}