convertUserFromJson static method
Implementation
static Threat convertUserFromJson(String json) {
try {
var jsonData = jsonDecode(json);
return Threat.fromJson(jsonData);
} on FormatException {
throw CustomFormatException(
message:
'\n that is the wrong format for Threat \n $json\n right String format [{"threatId":"value","name":"value"}] \n Note: threatId is optional');
}
}