-Changed serializer to better work with ICollection<T> when deserializing

-Improved serializer caching of static type data
This commit is contained in:
JamesNK
2008-09-08 08:46:23 +00:00
parent 7b0f3a7ccc
commit d193ae37be
11 changed files with 896 additions and 25 deletions
@@ -36,15 +36,15 @@ namespace Newtonsoft.Json
_converterType = converterType;
}
internal JsonConverter CreateJsonConverterInstance()
internal static JsonConverter CreateJsonConverterInstance(Type converterType)
{
try
{
return (JsonConverter)Activator.CreateInstance(_converterType);
return (JsonConverter)Activator.CreateInstance(converterType);
}
catch (Exception ex)
{
throw new Exception("Error creating {0}".FormatWith(CultureInfo.InvariantCulture, _converterType), ex);
throw new Exception("Error creating {0}".FormatWith(CultureInfo.InvariantCulture, converterType), ex);
}
}
}