toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'_id'] = id;
  if (rev != null) {
    json[r'_rev'] = rev;
  }
  if (source_ != null) {
    json[r'source'] = source_;
  }
  if (target != null) {
    json[r'target'] = target;
  }
  if (owner != null) {
    json[r'owner'] = owner;
  }
  if (createTarget != null) {
    json[r'create_target'] = createTarget;
  }
  if (continuous != null) {
    json[r'continuous'] = continuous;
  }
  json[r'doc_ids'] = docIds;
  if (replicationState != null) {
    json[r'_replication_state'] = replicationState;
  }
  if (replicationStateTime != null) {
    json[r'_replication_state_time'] = replicationStateTime!.toUtc().toIso8601String();
  }
  if (replicationStats != null) {
    json[r'_replication_stats'] = replicationStats;
  }
  if (errorCount != null) {
    json[r'error_count'] = errorCount;
  }
  return json;
}