The right thing to do is to return [pos,x, pos.y, pos.z] (or maybe pos). The middleware layer will take care about the string format before exporting it outside Morse (and so in case of socket, it will just a standard json output).