Parse json data from server.