-Added support to deserializing to IEnumerable<T>, IList<T>, IDictionary<K, V>

-Added populating members when creating object from non default constructor
-Added case best match when deserializing properties
-Added ToString(Formatting, JsonConverters[]) overload to JToken
-Added SerializeObject(object, Formatting, JsonConverter[]) overload to JsonConvert
-Added IMappingResolver. Property added to JsonSerializer, JsonSerializerSettings, JsonSchemaGenerator
-Added CamelCaseMappingResolver
This commit is contained in:
JamesNK
2009-03-14 00:38:28 +00:00
parent e5eaa14990
commit 9fd47e6334
24 changed files with 873 additions and 206 deletions
+14 -1
View File
@@ -506,7 +506,7 @@ namespace Newtonsoft.Json.Tests.Linq
new JValue(new DateTime(2009, 2, 15, 0, 0, 0, DateTimeKind.Utc))
);
string json = a.ToString(new IsoDateTimeConverter());
string json = a.ToString(Formatting.Indented, new IsoDateTimeConverter());
Assert.AreEqual(@"[
""2009-02-15T00:00:00.0000000Z""
@@ -517,6 +517,19 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.AreEqual(@"[""2009-02-15T00:00:00.0000000Z""]", json);
}
[Test]
public void ToStringWithNoIndenting()
{
JArray a =
new JArray(
new JValue(new DateTime(2009, 2, 15, 0, 0, 0, DateTimeKind.Utc))
);
string json = a.ToString(Formatting.None, new IsoDateTimeConverter());
Assert.AreEqual(@"[""2009-02-15T00:00:00.0000000Z""]", json);
}
[Test]
public void AddAfterSelf()
{