AssistDescription.fromJson constructor
AssistDescription.fromJson(})
Implementation
factory AssistDescription.fromJson(
JsonDecoder jsonDecoder,
String jsonPath,
Object? json, {
ClientUriConverter? clientUriConverter,
}) {
json ??= {};
if (json is! Map) {
throw jsonDecoder.mismatch(jsonPath, "'AssistDescription'", json);
}
String id;
if (json case {'id': var encodedId}) {
id = jsonDecoder.decodeString('$jsonPath.id', encodedId);
} else {
throw jsonDecoder.mismatch(jsonPath, "'id'", json);
}
String message;
if (json case {'message': var encodedMessage}) {
message = jsonDecoder.decodeString('$jsonPath.message', encodedMessage);
} else {
throw jsonDecoder.mismatch(jsonPath, "'message'", json);
}
return AssistDescription(id, message);
}