Send json over sockets.