-Modified project to support signed flag. Does not output InternalsVisibleTo attributes when present
-Improved error message on JObject and JArray Load method -Added WriteRawValue -Added missing XML documentation -Added SerializeObject overload that takes a formatting flag
This commit is contained in:
@@ -309,5 +309,13 @@ Parameter name: arrayIndex")]
|
||||
Assert.AreEqual("LastNameValue", raw.LastName);
|
||||
Assert.AreEqual("[1,2,3,4,5]", raw.RawContent.Content);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(Exception), ExpectedMessage = "Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray")]
|
||||
public void Parse_ShouldThrowOnUnexpectedToken()
|
||||
{
|
||||
string json = @"[""prop""]";
|
||||
JObject.Parse(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user