toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  Map<String, dynamic> featureImageJson = Map<String, dynamic>();
  try {
    featureImageJson = featureImage.toJson();
  } catch (exception) {/* ignore */}

  return {
    'id': id,
    'title': title,
    'link': link,
    'publishedDate': publishedDate,
    'publishedSince': publishedSince,
    'teaserText': teaserText,
    'featureImage': featureImageJson,
    'parentCategoryId': parentCategoryId,
    'parentCategory': parentCategory,
    'categoryId': categoryId,
    'category': category,
    'issueTitle': issueTitle,
    'issueTeaserText': issueTeaserText,
    'issueNumber': issueNumber,
    'volumeNumber': volumeNumber,
    'paragraphRawContent': paragraphRawContent,
    'issuePublishedDate': issuePublishedDate,
    'isPDFArticle': isPDFArticle,
    'pdfURL': pdfURL,
    'authors': authors,
  };
}