Clean up DuplicatePropertyNameHandling feature
This commit is contained in:
@@ -1770,11 +1770,11 @@ third line", jsonTextReader.Value);
|
||||
}
|
||||
";
|
||||
|
||||
JsonLoadSettings settings = new JsonLoadSettings { DuplicatePropertyNamesHandling = DuplicatePropertyNamesHandling.Throw };
|
||||
JsonLoadSettings settings = new JsonLoadSettings { DuplicatePropertyNameHandling = DuplicatePropertyNameHandling.Error };
|
||||
|
||||
JsonTextReader reader = new JsonTextReader(new StringReader(json));
|
||||
await ExceptionAssert.ThrowsAsync<JsonException>( async () => await JToken.ReadFromAsync(reader, settings));
|
||||
await ExceptionAssert.ThrowsAsync<JsonReaderException>(async () => await JToken.ReadFromAsync(reader, settings));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user