Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/Newtonsoft.Json.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamesNK <james@newtonking.com>2010-09-12 15:19:48 +0400
committerJamesNK <james@newtonking.com>2010-09-12 15:19:48 +0400
commit207119fefaf56da75e1a66f0671a4eda70497822 (patch)
tree58bc56287f74a255f7f30f5de07609fc0ea6a837 /Src/Newtonsoft.Json/JsonReader.cs
parent235770442ac9d8ee3bcf3428c5202dde431cecca (diff)
-Added JsonReader.ReadAsDecimal
-Fixed losing decimal precision when deserializing decimals
Diffstat (limited to 'Src/Newtonsoft.Json/JsonReader.cs')
-rw-r--r--Src/Newtonsoft.Json/JsonReader.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/Src/Newtonsoft.Json/JsonReader.cs b/Src/Newtonsoft.Json/JsonReader.cs
index 2ec2883..4f37562 100644
--- a/Src/Newtonsoft.Json/JsonReader.cs
+++ b/Src/Newtonsoft.Json/JsonReader.cs
@@ -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>