-Fixed bug when converting certain XML with namespaces
-Add support for serializing F# lists, sets and maps
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user