toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'jsonrpc': '2.0',
  'id': id,
  if (result != null) 'result': result,
  if (error != null) 'error': error!.toJson(),
};