Make sure the response for the .json calls is treated as JSON.