代碼重現:System.Json中的錯誤?
JsonPrimitive a = new JsonPrimitive("<a href=\"\"/>");
//or the same: JsonPrimitive a = new JsonPrimitive(@"<a href=""/>");
Console.WriteLine(a.ToString());
//or Console.WriteLine((string)a);
//On the console screen I got: "<a href=\""/>"
//Ideal: "<a href=\"\"/>"
我System.Json.dll的版本是2.0.5.0。這是一個錯誤嗎?那麼解決方案是什麼?
2015年8月更新:這是一個bug,已經在MONO中修復。檢查我的答案下面的鏈接。
你的意思是你有''對嗎? –
@MarcinSeredynski:這很難解釋。您可以運行我的代碼並查看結果。 –