data sent via sockets are json encoded