-Added BigInteger support

This commit is contained in:
James Newton-King
2013-03-16 19:06:05 +13:00
parent b81dfd352a
commit 1356c31670
24 changed files with 957 additions and 50 deletions
+15
View File
@@ -26,6 +26,9 @@
using System;
using System.Collections.Generic;
using System.Globalization;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
using System.Numerics;
#endif
using System.Text;
using System.IO;
using System.Xml;
@@ -581,6 +584,18 @@ namespace Newtonsoft.Json
WriteValueInternal(JsonConvert.ToString(value, _quoteChar), JsonToken.String);
}
}
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
/// <summary>
/// Writes a <see cref="BigInteger"/> value.
/// </summary>
/// <param name="value">The <see cref="BigInteger"/> value to write.</param>
public override void WriteValue(BigInteger value)
{
InternalWriteValue(JsonToken.Integer);
WriteValueInternal(value.ToString(CultureInfo.InvariantCulture), JsonToken.String);
}
#endif
#endregion
/// <summary>