-Added additional ToString overloads to JValue

-Fixed poor error message when dynamic type cannot be created during deserialization
-Fixed error when setting a null value on a dynamic type during deserialization
-Fixed JsonTextReader.ReadAsDecimal not attempting to convert string values to decimal
This commit is contained in:
JamesNK
2011-02-24 10:14:08 +00:00
parent 1824aa4b59
commit 71446e9772
8 changed files with 169 additions and 11 deletions
@@ -25,6 +25,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using NUnit.Framework;
@@ -285,7 +286,7 @@ keyword such as type of business.""
1264118400000
)", o.Property("Establised").Value.ToString());
Assert.AreEqual(@"""Width"": 1.1", o.Property("Width").ToString());
Assert.AreEqual(@"1.1", o.Property("Width").Value.ToString());
Assert.AreEqual(@"1.1", ((JValue)o.Property("Width").Value).ToString(CultureInfo.InvariantCulture));
Assert.AreEqual(@"""Open"": false", o.Property("Open").ToString());
Assert.AreEqual(@"False", o.Property("Open").Value.ToString());