-Fixed bug when converting certain XML with namespaces

-Add support for serializing F# lists, sets and maps
This commit is contained in:
James Newton-King
2014-03-09 17:46:36 +13:00
parent f6c74bdf3c
commit d5b71afc88
26 changed files with 9193 additions and 70 deletions
@@ -117,8 +117,18 @@ namespace Newtonsoft.Json.Serialization
}
if (keyType != null && valueType != null)
{
ParametrizedConstructor = CollectionUtils.ResolveEnumableCollectionConstructor(CreatedType, typeof(KeyValuePair<,>).MakeGenericType(keyType, valueType));
#if !(NET35 || NET20 || NETFX_CORE)
if (ParametrizedConstructor == null && underlyingType.Name == FSharpUtils.FSharpMapTypeName)
{
FSharpUtils.EnsureInitialized(underlyingType.Assembly());
ParametrizedConstructor = FSharpUtils.CreateMap(keyType, valueType);
}
#endif
}
ShouldCreateWrapper = !typeof(IDictionary).IsAssignableFrom(CreatedType);
DictionaryKeyType = keyType;