I think it would be better to handle OnReceived, send a json string and use that directly in Connection.Send:

```
protected override Task OnReceived(IRequest request, string connectionId, string data)
{
    var jsonBytes = new ArraySegment<byte>(Encoding.UTF8.GetBytes(data));
    return Connection.Send(connectionId, jsonBytes);
}
```