fromJson method

  1. @override
UServiceLabel fromJson(
  1. Map<String, dynamic> json
)

Implementation

@override
UServiceLabel fromJson(Map<String, dynamic> json) {
  try {
    if (isSelfLabels(json)) {
      return UServiceLabel.selfLabels(
        data: const SelfLabelsConverter().fromJson(json),
      );
    }

    return UServiceLabel.unknown(data: json);
  } catch (_) {
    return UServiceLabel.unknown(data: json);
  }
}