-Fixed exception when loading JObject with multiple properties of the same name. Last property will be used

-Removed redundant ValidateObject method from JContainer
This commit is contained in:
JamesNK
2009-10-03 04:33:15 +00:00
parent 33ac3a9c44
commit be8d951c03
6 changed files with 31 additions and 54 deletions
-8
View File
@@ -218,14 +218,6 @@ namespace Newtonsoft.Json.Linq
: CreateFromContent(content);
}
internal override void ValidateObject(JToken o, JToken previous)
{
ValidationUtils.ArgumentNotNull(o, "o");
if (o.Type == JTokenType.Property)
throw new ArgumentException("An item of type {0} cannot be added to content.".FormatWith(CultureInfo.InvariantCulture, o.Type));
}
/// <summary>
/// Writes this token to a <see cref="JsonWriter"/>.
/// </summary>