InlineCommentModel.fromJson constructor

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

Implementation

factory InlineCommentModel.fromJson(Map<String, Object?> json) {
  return InlineCommentModel(
    id: json[r'id'] as String?,
    status: json[r'status'] as String?,
    title: json[r'title'] as String?,
    blogPostId: json[r'blogPostId'] as String?,
    pageId: json[r'pageId'] as String?,
    parentCommentId: json[r'parentCommentId'] as String?,
    version: json[r'version'] != null
        ? Version.fromJson(json[r'version']! as Map<String, Object?>)
        : null,
    body: json[r'body'] != null
        ? BodySingle.fromJson(json[r'body']! as Map<String, Object?>)
        : null,
    resolutionLastModifierId: json[r'resolutionLastModifierId'] as String?,
    resolutionLastModifiedAt:
        DateTime.tryParse(json[r'resolutionLastModifiedAt'] as String? ?? ''),
    resolutionStatus: json[r'resolutionStatus'] as String?,
    properties: json[r'properties'] != null
        ? InlineCommentProperties.fromJson(
            json[r'properties']! as Map<String, Object?>)
        : null,
    links: json[r'_links'] != null
        ? CommentLinks.fromJson(json[r'_links']! as Map<String, Object?>)
        : null,
  );
}