JiraExpressionAnalysis.fromJson constructor

JiraExpressionAnalysis.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory JiraExpressionAnalysis.fromJson(Map<String, Object?> json) {
  return JiraExpressionAnalysis(
    complexity: json[r'complexity'] != null
        ? JiraExpressionComplexity.fromJson(
            json[r'complexity']! as Map<String, Object?>)
        : null,
    errors: (json[r'errors'] as List<Object?>?)
            ?.map((i) => JiraExpressionValidationError.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    expression: json[r'expression'] as String? ?? '',
    type: json[r'type'] as String?,
    valid: json[r'valid'] as bool? ?? false,
  );
}