fromJson static method

Alert fromJson(
  1. Map<String, dynamic> json
)

Decodes from JSON.

Implementation

static Alert fromJson(Map<String, dynamic> json) => Alert(
  rule: AlertRule.fromJson(Json.asObject(json['rule'], 'rule')),
  nodeId: Json.requireString(json, 'nodeId'),
  since: Json.requireTimestamp(json, 'since'),
  value: Json.optDouble(json, 'value'),
);