-Add support for using implicit/explicit casts when converting a JSON property name to a dictionary value

-Fix DynamicReflectionDelegateFactory erroring when calling static methods
-Fix CustomCreationConverter to return null when converting a null JSON value
This commit is contained in:
JamesNK
2010-03-23 00:21:57 +00:00
parent 408a407105
commit 7f7cccd598
7 changed files with 214 additions and 8 deletions
@@ -573,7 +573,7 @@ namespace Newtonsoft.Json.Serialization
}
catch (Exception ex)
{
throw new JsonSerializationException("Could not convert string '{0}' to dictionary key type {1}. Create a TypeConverter to convert from the string to the key type object.".FormatWith(CultureInfo.InvariantCulture, reader.Value, contract.DictionaryKeyType), ex);
throw new JsonSerializationException("Could not convert string '{0}' to dictionary key type '{1}'. Create a TypeConverter to convert from the string to the key type object.".FormatWith(CultureInfo.InvariantCulture, reader.Value, contract.DictionaryKeyType), ex);
}
CheckedRead(reader);