-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
@@ -352,6 +352,14 @@ namespace Newtonsoft.Json.Utilities
return (IList)ReflectionUtils.CreateGeneric(typeof(List<>), listType);
}
public static IDictionary CreateGenericDictionary(Type keyType, Type valueType)
{
ValidationUtils.ArgumentNotNull(keyType, "keyType");
ValidationUtils.ArgumentNotNull(valueType, "valueType");
return (IDictionary)ReflectionUtils.CreateGeneric(typeof(Dictionary<,>), keyType, valueType);
}
public static bool IsListType(Type type)
{
ValidationUtils.ArgumentNotNull(type, "type");