-Added BigInteger support
This commit is contained in:
@@ -28,6 +28,9 @@ using System;
|
||||
using System.Collections.Concurrent;
|
||||
#endif
|
||||
using System.Collections.Generic;
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
using System.Numerics;
|
||||
#endif
|
||||
#if !SILVERLIGHT && !NET20 && !NETFX_CORE
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Configuration;
|
||||
@@ -7617,6 +7620,19 @@ Parameter name: value",
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
public void SerializeBigInteger()
|
||||
{
|
||||
BigInteger i = BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990");
|
||||
|
||||
string json = JsonConvert.SerializeObject(new [] {i}, Formatting.Indented);
|
||||
|
||||
Assert.AreEqual(@"[
|
||||
123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990
|
||||
]", json);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE)
|
||||
[Test]
|
||||
public void DeserializeReadOnlyList()
|
||||
|
||||
Reference in New Issue
Block a user