-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
@@ -25,6 +25,9 @@
using System;
using System.Globalization;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
using System.Numerics;
#endif
using Newtonsoft.Json.Utilities;
namespace Newtonsoft.Json.Linq
@@ -428,6 +431,18 @@ namespace Newtonsoft.Json.Linq
base.WriteValue(value);
AddValue(value, 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)
{
base.WriteValue(value);
AddValue(value, JsonToken.Integer);
}
#endif
#endregion
}
}