-Fixed JToken.Load not reading past comment when CommentHandling is Ignore

-Fix JsonReader.ReadAsDecimal with JValue and BigInteger value
This commit is contained in:
James Newton-King
2017-05-13 19:14:16 +12:00
parent 515fee0b52
commit 1535268ab8
6 changed files with 193 additions and 7 deletions
@@ -52,6 +52,22 @@ namespace Newtonsoft.Json.Tests.Linq
[TestFixture]
public class LinqToJsonTest : TestFixtureBase
{
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_3
public class DemoClass
{
public decimal maxValue;
}
[Test]
public void ToObjectDecimal()
{
var jArray = JArray.Parse("[{ maxValue:10000000000000000000 }]");
var list = jArray.ToObject<List<DemoClass>>();
Assert.AreEqual(10000000000000000000m, list[0].maxValue);
}
#endif
[Test]
public void FromObjectGuid()
{