getting json from server by sending a json