toJson method

Map<String, Object?> toJson()

Encodes this value to its wire object.

Implementation

Map<String, Object?> toJson() {
  final result = <String, Object?>{};
  result['method'] = method;
  if (params != null) {
    result['params'] = params!.toObject();
  }
  return result;
}