Switched to JSON format of exchange between the client and the server.