我有一個字符串作爲documentDB的ID,它很長。解析值時遇到意外的字符:e。路徑'',第0行,位置0,同時試圖刪除documentDB中的文檔
var longId = "Ardell Natural Lashes are popular lashes because women love that they're lightweight, reusable, easy-to-apply and give the desired, natural look of full, beautiful lashes. \n• Ardell false eyelashes are made from sterilized, 100% human hair."
var documentlink = database + "/doc/" + longId;
當我想刪除文檔時,我需要從ID創建的文檔鏈接。當我執行該功能,我得到這個異常消息
"Unexpected character encountered while parsing value: e. Path '', line 0, position 0 while trying to delete documents in documentDB."
任何人都可以建議我如何改變這個字符串是可用一個在documentDB?
感謝您的幫助,我無法刪除字符串中的\ n但我已經通過獲取文檔的selflink解決了這個問題。但是,如果您可以建議我如何刪除\ n,這可能非常有用。 –