toJson method

  1. @override
Object toJson()

Implementation

@override
Object toJson() => {
  if (nullValue case final nullValue?) 'nullValue': nullValue.toJson(),
  if (booleanValue case final booleanValue?) 'booleanValue': booleanValue,
  if (integerValue case final integerValue?)
    'integerValue': integerValue.toString(),
  if (doubleValue case final doubleValue?)
    'doubleValue': encodeDouble(doubleValue),
  if (timestampValue case final timestampValue?)
    'timestampValue': timestampValue.toJson(),
  if (stringValue case final stringValue?) 'stringValue': stringValue,
  if (bytesValue case final bytesValue?)
    'bytesValue': encodeBytes(bytesValue),
  if (referenceValue case final referenceValue?)
    'referenceValue': referenceValue,
  if (geoPointValue case final geoPointValue?)
    'geoPointValue': geoPointValue.toJson(),
  if (arrayValue case final arrayValue?) 'arrayValue': arrayValue.toJson(),
  if (mapValue case final mapValue?) 'mapValue': mapValue.toJson(),
  if (fieldReferenceValue case final fieldReferenceValue?)
    'fieldReferenceValue': fieldReferenceValue,
  if (variableReferenceValue case final variableReferenceValue?)
    'variableReferenceValue': variableReferenceValue,
  if (functionValue case final functionValue?)
    'functionValue': functionValue.toJson(),
  if (pipelineValue case final pipelineValue?)
    'pipelineValue': pipelineValue.toJson(),
};