CommentDTO.fromJson constructor
Implementation
factory CommentDTO.fromJson(Map<String, Object?> json) {
return CommentDTO(
expands: (json[r'_expands'] as List<Object?>?)
?.map((i) => i as String? ?? '')
.toList() ??
[],
links: json[r'_links'] != null
? SelfLinkDTO.fromJson(json[r'_links']! as Map<String, Object?>)
: null,
attachments: json[r'attachments'] != null
? PagedDTOAttachmentDTO.fromJson(
json[r'attachments']! as Map<String, Object?>)
: null,
author: json[r'author'] != null
? UserDTO.fromJson(json[r'author']! as Map<String, Object?>)
: null,
body: json[r'body'] as String?,
created: json[r'created'] != null
? DateDTO.fromJson(json[r'created']! as Map<String, Object?>)
: null,
id: json[r'id'] as String?,
public: json[r'public'] as bool? ?? false,
renderedBody: json[r'renderedBody'] != null
? RenderedValueDTO.fromJson(
json[r'renderedBody']! as Map<String, Object?>)
: null,
);
}