-Updated nuspec file for 4.0

-Added Load and Parse helper methods to JToken
-Fixed performance issues when deserializing with partial type names
-Fixed deserializing certain decimal values on classes with non-default constructors
This commit is contained in:
JamesNK
2011-01-08 04:39:33 +00:00
parent 0fb78fdb91
commit ac6c65f48a
11 changed files with 159 additions and 24 deletions
@@ -863,8 +863,6 @@ namespace Newtonsoft.Json.Serialization
{
case JsonToken.PropertyName:
string memberName = reader.Value.ToString();
if (!reader.Read())
throw new JsonSerializationException("Unexpected end when setting {0}'s value.".FormatWith(CultureInfo.InvariantCulture, memberName));
// attempt exact case match first
// then try match ignoring case
@@ -872,6 +870,9 @@ namespace Newtonsoft.Json.Serialization
if (property != null)
{
if (!ReadForType(reader, property.PropertyType, property.Converter))
throw new JsonSerializationException("Unexpected end when setting {0}'s value.".FormatWith(CultureInfo.InvariantCulture, memberName));
if (!property.Ignored)
propertyValues[property] = CreateValueProperty(reader, property, null, true, null);
else
@@ -879,6 +880,9 @@ namespace Newtonsoft.Json.Serialization
}
else
{
if (!reader.Read())
throw new JsonSerializationException("Unexpected end when setting {0}'s value.".FormatWith(CultureInfo.InvariantCulture, memberName));
if (Serializer.MissingMemberHandling == MissingMemberHandling.Error)
throw new JsonSerializationException("Could not find member '{0}' on object of type '{1}'".FormatWith(CultureInfo.InvariantCulture, memberName, objectType.Name));