Array being sent as String on node.js

I am doing some experimenting with socket.io. I have a canvas that successfully sends data to the server which receives it fine.

It receives a Uint8ClampedArray which is correct because that is what is being sent.

When I then .send this message from the server to the client, I get a string: [object Object]. Again I have checked! Am I missing something, the code for the server is below:

var fs, http, io, server;
fs = require('fs');
http = require('http');
server = http.createServer(function(req, res) {
    return fs.readFile("" + __dirname + "/front.html", function(err, data) {
        res.writeHead(200, {
            'Content-Type': 'text/html'
        });
        return res.end(data, 'utf8');
    });
});
server.listen(1337);
io = require('socket.io').listen(server);
io.sockets.on('connection', function(socket) {
    socket.on('publish', function(message) {
         return io.sockets.send(message);
    });
});

On Client:

data = JSON.stringify(data); // convert array to string

On Server:

data = JSON.parse(data); // convert string to array

The only way is to reuse Uint8ClampedArray in your client size. If you have this on your server-side

var x = new Uint8ClampedArray(3);
x[0] = -17;
x[1] = 93;
x[2] = 350;
var dataThatWillBeSent = JSON.stringify(x);
// '{"0":0,"1":93,"2":255,"length":3,"byteLength":3,"byteOffset":0,"buffer":{"byteLength":3}}'

In your client side, assume that you have included Uint8ClampedArray, you can do this

var dataReceived = '{"0":0,"1":93,"2":255,"length":3,"byteLength":3,"byteOffset":0,"buffer":{"byteLength":3}}';
dataReceived = JSON.parse(dataReceived);
// reconstruct Uint8ClampedArray object

I have not used Uint8ClampedArray before, so I dont know exactly how you can recover a Uint8ClampedArray object from a JSON data, but if you read the document you might be able to figure something out