Return connection along with json