UserProperty.fromJson constructor

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

Implementation

factory UserProperty.fromJson(Map<String, Object?> json) {
  return UserProperty(
    key: json[r'key'] as String? ?? '',
    value: json[r'value'] as Map<String, Object?>? ?? {},
    id: json[r'id'] as String? ?? '',
    lastModifiedDate:
        DateTime.tryParse(json[r'lastModifiedDate'] as String? ?? '') ??
            DateTime(0),
    createdDate: DateTime.tryParse(json[r'createdDate'] as String? ?? '') ??
        DateTime(0),
    links: json[r'_links'] != null
        ? GenericLinks.fromJson(json[r'_links']! as Map<String, Object?>)
        : null,
  );
}