-Properties on dynamic objects with JsonProperty/DataMember will now be included in serialized JSON

-Serialize and deserialize multidimensional arrays
This commit is contained in:
James Newton-King
2012-07-31 20:53:26 +12:00
parent 0f76d0285d
commit 32dc957880
12 changed files with 602 additions and 59 deletions
@@ -47,6 +47,8 @@ namespace Newtonsoft.Json.Serialization
/// <value>The <see cref="Type"/> of the collection items.</value>
public Type CollectionItemType { get; private set; }
public bool IsMultidimensionalArray { get; private set; }
private readonly bool _isCollectionItemTypeNullableType;
private readonly Type _genericCollectionDefinitionType;
private Type _genericWrapperType;
@@ -82,6 +84,8 @@ namespace Newtonsoft.Json.Serialization
{
CreatedType = ReflectionUtils.MakeGenericType(typeof(List<>), CollectionItemType);
}
IsMultidimensionalArray = (UnderlyingType.IsArray && UnderlyingType.GetArrayRank() > 1);
}
internal IWrappedCollection CreateWrapper(object list)