-Added DataSetConverter, DataTableConverter

-Added JPath and SelectToken to JToken
-Fixed schema id not being written for collections
-Fixed TimeSpan serialization on Compact Framework
-Fixed unicode line break string encoding
This commit is contained in:
JamesNK
2009-10-14 02:40:20 +00:00
parent b313445e01
commit b4b3905714
23 changed files with 1053 additions and 10 deletions
@@ -154,6 +154,21 @@ now brown cow?", '"', true);
Assert.AreEqual(result, @"'Fred\'s ""cat"".'");
}
[Test]
public void EscapeJavaScriptString_UnicodeLinefeeds()
{
string result;
result = JavaScriptUtils.ToEscapedJavaScriptString("before" + '\u0085' + "after", '"', true);
Assert.AreEqual(@"""before\u0085after""", result);
result = JavaScriptUtils.ToEscapedJavaScriptString("before" + '\u2028' + "after", '"', true);
Assert.AreEqual(@"""before\u2028after""", result);
result = JavaScriptUtils.ToEscapedJavaScriptString("before" + '\u2029' + "after", '"', true);
Assert.AreEqual(@"""before\u2029after""", result);
}
[Test]
[ExpectedException(typeof(ArgumentException), ExpectedMessage = "Unsupported type: System.Version. Use the JsonSerializer class to get the object's JSON representation.")]
public void ToStringInvalid()