toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final ret = <String, dynamic>{
    'jsonrpc': jsonrpc,
    'id': id,
  };
  if (result != null) {
    ret['result'] = result;
  }
  if (error != null) {
    ret['error'] = error;
  }
  return ret;
}