-Fixed error in JTokenWriter when disposing after adding a duplicate property
-Fixed not validating JSON when deserializing with DataTableConverter
This commit is contained in:
@@ -155,9 +155,11 @@ namespace Newtonsoft.Json.Linq
|
||||
/// <param name="name">The name of the property.</param>
|
||||
public override void WritePropertyName(string name)
|
||||
{
|
||||
base.WritePropertyName(name);
|
||||
|
||||
AddParent(new JProperty(name));
|
||||
|
||||
// don't set state until after in case of an error such as duplicate property names
|
||||
// incorrect state will cause issues if writer is disposed when closing open properties
|
||||
base.WritePropertyName(name);
|
||||
}
|
||||
|
||||
private void AddValue(object value, JsonToken token)
|
||||
|
||||
Reference in New Issue
Block a user