Resource.fromJson constructor

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

Implementation

factory Resource.fromJson(Map<String, dynamic> json) {
  return Resource(
    id: json['id'] as String?,
    parentId: json['parentId'] as String?,
    path: json['path'] as String?,
    pathPart: json['pathPart'] as String?,
    resourceMethods: (json['resourceMethods'] as Map<String, dynamic>?)?.map(
        (k, e) => MapEntry(k, Method.fromJson(e as Map<String, dynamic>))),
  );
}