Make endpoints json because ajax domain only responds to requests for json