-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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user