toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'topic': topic,
if (result != null) 'result': result?.toJson(),
if (error != null) 'error': error!.toJson(),
if (jsonRpcError != null) 'jsonRpcError': jsonRpcError!.toJson(),
};