Added JSON functionality to locations CRUD