toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final binaryValue = this.binaryValue;
  final booleanValue = this.booleanValue;
  final datetimeValue = this.datetimeValue;
  final numberValue = this.numberValue;
  final stringValue = this.stringValue;
  return {
    if (binaryValue != null) 'BinaryValue': base64Encode(binaryValue),
    if (booleanValue != null) 'BooleanValue': booleanValue,
    if (datetimeValue != null)
      'DatetimeValue': unixTimestampToJson(datetimeValue),
    if (numberValue != null) 'NumberValue': numberValue,
    if (stringValue != null) 'StringValue': stringValue,
  };
}