-Fixed deserializing a null string throwing a NullReferenceException

-Fixed JsonTextReader reading from a slow stream
-Fixed CultureInfo not being overridden on JsonSerializerProxy
-Fixed full trust security check in .NET 2.0 & .NET 3.5
-Improved writing JSON with indent performance
This commit is contained in:
James Newton-King
2012-03-31 14:30:14 +13:00
parent 8471c4ffe1
commit a032f4bbf3
12 changed files with 300 additions and 178 deletions
@@ -114,6 +114,20 @@ namespace Newtonsoft.Json.Tests
}
#endif
[Test]
public void DeserializeObject_EmptyString()
{
object result = JsonConvert.DeserializeObject(string.Empty);
Assert.IsNull(result);
}
[Test]
public void DeserializeObject_Integer()
{
object result = JsonConvert.DeserializeObject("1");
Assert.AreEqual(1L, result);
}
[Test]
public void EscapeJavaScriptString()
{