-Added JsonReader.ReadAsDecimal
-Fixed losing decimal precision when deserializing decimals
This commit is contained in:
@@ -210,12 +210,18 @@ namespace Newtonsoft.Json
|
||||
/// <returns>A <see cref="T:Byte[]"/> or a null reference if the next JSON token is null.</returns>
|
||||
public abstract byte[] ReadAsBytes();
|
||||
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="Nullable{Decimal}"/>.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="Nullable{Decimal}"/>.</returns>
|
||||
public abstract decimal? ReadAsDecimal();
|
||||
|
||||
#if !NET20
|
||||
/// <summary>
|
||||
/// Reads the next JSON token from the stream as a <see cref="DateTimeOffset"/>.
|
||||
/// Reads the next JSON token from the stream as a <see cref="Nullable{DateTimeOffset}"/>.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="DateTimeOffset"/>.</returns>
|
||||
public abstract DateTimeOffset ReadAsDateTimeOffset();
|
||||
/// <returns>A <see cref="Nullable{DateTimeOffset}"/>.</returns>
|
||||
public abstract DateTimeOffset? ReadAsDateTimeOffset();
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user