receive and send json objects