Move JSON parse to sendResponse constructor.