ContentProperty.fromJson constructor

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

Implementation

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