Edit route for json requests