-Added additional frameworks to project.json files

This commit is contained in:
James Newton-King
2015-08-22 19:08:40 +12:00
parent 6b02abe20c
commit a9ea63da59
142 changed files with 1090 additions and 222 deletions
@@ -221,5 +221,28 @@ namespace Newtonsoft.Json.Tests.Linq
ExceptionAssert.Throws<JsonException>(() => { t.Add(1); }, "Newtonsoft.Json.Linq.JProperty cannot have multiple values.");
}
[Test]
public void NullParent()
{
var json = @"{
""prop1"": {
""foo"": ""bar""
},
}";
var obj = JsonConvert.DeserializeObject<JObject>(json);
var property = obj.Property("prop1");
var value = property.Value;
// remove value so it has no parent
property.Value = null;
property.Remove();
obj.Add(new JProperty("prop2", value));
Assert.AreEqual(((JProperty)value.Parent).Name, "prop2");
}
}
}