-Added ReadAsInt32 to JsonReader
-Improved performance by using an enum rather than a type check to test contract type
This commit is contained in:
@@ -344,6 +344,18 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="Nullable{Int32}"/>.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="Nullable{Int32}"/>.</returns>
|
||||
public override int? ReadAsInt32()
|
||||
{
|
||||
int? i = _reader.ReadAsInt32();
|
||||
|
||||
ValidateCurrentToken();
|
||||
return i;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="T:Byte[]"/>.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user