client close after it sends the json