-Added JsonReader.ReadAsDecimal

-Fixed losing decimal precision when deserializing decimals
This commit is contained in:
JamesNK
2010-09-12 11:19:48 +00:00
parent 235770442a
commit 207119fefa
7 changed files with 252 additions and 62 deletions
+9 -3
View File
@@ -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>