ProblemReport.fromJson constructor
ProblemReport.fromJson(
- dynamic jsonObject
Implementation
ProblemReport.fromJson(dynamic jsonObject) : super.fromJson(jsonObject) {
if (type != DidcommMessages.problemReport.value) {
throw Exception('Wrong message type');
}
if (body.containsKey('code')) {
code = body['code'];
} else {
throw FormatException('code property is needed in Problem Report');
}
comment = body['comment'];
args = body['args'];
escalateTo = body['escalate_to'];
}