Citation.fromJson constructor

Citation.fromJson(
  1. Object? j
)

Implementation

factory Citation.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Citation(
    startIndex: switch (json['startIndex']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    endIndex: switch (json['endIndex']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    uri: switch (json['uri']) {
      null => '',
      Object $1 => decodeString($1),
    },
    title: switch (json['title']) {
      null => '',
      Object $1 => decodeString($1),
    },
    license: switch (json['license']) {
      null => '',
      Object $1 => decodeString($1),
    },
    publicationDate: switch (json['publicationDate']) {
      null => null,
      Object $1 => Date.fromJson($1),
    },
  );
}