render json on tcp connection callback