SpaceProperty.fromJson constructor

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

Implementation

factory SpaceProperty.fromJson(Map<String, Object?> json) {
  return SpaceProperty(
    id: json[r'id'] as String? ?? '',
    key: json[r'key'] as String? ?? '',
    value: json[r'value'],
    version: json[r'version'] != null
        ? Version.fromJson(json[r'version']! as Map<String, Object?>)
        : null,
    space: json[r'space'] != null
        ? Space.fromJson(json[r'space']! as Map<String, Object?>)
        : null,
    links: json[r'_links'] != null
        ? GenericLinks.fromJson(json[r'_links']! as Map<String, Object?>)
        : null,
    expandable: SpacePropertyExpandable.fromJson(
        json[r'_expandable'] as Map<String, Object?>? ?? const {}),
  );
}