client and server is exchanging jsons