mapFromJson static method

Implementation

static Map<String, OperationLinksAssignmentsIriTemplateMapping> mapFromJson(
    Map<String, dynamic>? json) {
  if (json == null) {
    return <String, OperationLinksAssignmentsIriTemplateMapping>{};
  }

  return json.entries.fold(
      <String, OperationLinksAssignmentsIriTemplateMapping>{},
      (Map<String, OperationLinksAssignmentsIriTemplateMapping> previousValue,
          element) {
    final OperationLinksAssignmentsIriTemplateMapping? object =
        OperationLinksAssignmentsIriTemplateMapping.fromJson(element.value);
    if (object is OperationLinksAssignmentsIriTemplateMapping) {
      previousValue[element.key] = object;
    }

    return previousValue;
  });
}