-Updated nuspec file for 4.0

-Added Load and Parse helper methods to JToken
-Fixed performance issues when deserializing with partial type names
-Fixed deserializing certain decimal values on classes with non-default constructors
This commit is contained in:
JamesNK
2011-01-08 04:39:33 +00:00
parent 0fb78fdb91
commit ac6c65f48a
11 changed files with 159 additions and 24 deletions
+15 -1
View File
@@ -60,7 +60,7 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.IsTrue(JToken.DeepEquals(new JValue(1), c.Values().ElementAt(0)));
JValue v;
v = (JValue)JToken.ReadFrom(new JsonTextReader(new StringReader(@"""stringvalue""")));
Assert.AreEqual("stringvalue", (string)v);
@@ -71,6 +71,20 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.AreEqual(1.1, (double)v);
}
[Test]
public void Load()
{
JObject o = (JObject)JToken.Load(new JsonTextReader(new StringReader("{'pie':true}")));
Assert.AreEqual(true, (bool)o["pie"]);
}
[Test]
public void Parse()
{
JObject o = (JObject)JToken.Parse("{'pie':true}");
Assert.AreEqual(true, (bool)o["pie"]);
}
[Test]
public void Parent()
{