-Added FloatParseHandling

-Fixed build
This commit is contained in:
James Newton-King
2013-03-26 21:53:28 +13:00
parent e5ee60497e
commit 70f5a1dced
25 changed files with 309 additions and 11 deletions
+11
View File
@@ -112,6 +112,7 @@ namespace Newtonsoft.Json
private int? _maxDepth;
private bool _hasExceededMaxDepth;
internal DateParseHandling _dateParseHandling;
internal FloatParseHandling _floatParseHandling;
private readonly List<JsonPosition> _stack;
/// <summary>
@@ -160,6 +161,15 @@ namespace Newtonsoft.Json
set { _dateParseHandling = value; }
}
/// <summary>
/// Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
/// </summary>
public FloatParseHandling FloatParseHandling
{
get { return _floatParseHandling; }
set { _floatParseHandling = value; }
}
/// <summary>
/// Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a <see cref="JsonReaderException"/>.
/// </summary>
@@ -263,6 +273,7 @@ namespace Newtonsoft.Json
_stack = new List<JsonPosition>(4);
_dateTimeZoneHandling = DateTimeZoneHandling.RoundtripKind;
_dateParseHandling = DateParseHandling.DateTime;
_floatParseHandling = FloatParseHandling.Double;
CloseInput = true;
}