C# System.Json中的一个bug?

C# System.Json中的一个bug?,c#,json,mono,C#,Json,Mono,要复制的代码: 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: "<

要复制的代码:

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=\"\"/>"
JsonPrimitive a=新的JsonPrimitive(“”);
//或者相同:JsonPrimitive a=新的JsonPrimitive(@“”);
Console.WriteLine(a.ToString());
//或Console.WriteLine((string)a);
//在控制台的屏幕上,我看到了:“
//理想:“”
mysystem.Json.dll的版本是2.0.5.0。是虫子吗?解决办法是什么


2015年8月更新:这是一个bug,已经在MONO中修复。检查下面我的答案中的链接。

如果你想得到

它被证明是汇编系统中的一个bug。的Json。JsonValue.cs方法
string DoEscapeString(StringBuilder sb、string src、int cur)中的第218和219行

原件:

    sb.Append(src[i++]);
    start = i;
固定的:

    sb.Append(src[i]);
    start = i + 1;

向mono团队报告。

你是说你得到了
对吗?@Marcineredynski:很难解释。您可以运行我的代码并查看结果。
    sb.Append(src[i++]);
    start = i;
    sb.Append(src[i]);
    start = i + 1;