Permalink
Browse files

-Fix 3.5 project compilation error due to unavailability of System.Nu…

…merics
  • Loading branch information...
1 parent e5ee604 commit f58071c0c5fd0503326f1e7f4eee11698e92410a @cdhowie committed Mar 25, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs
@@ -33,7 +33,9 @@
#endif
using System.Diagnostics;
using System.Globalization;
+#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
using System.Numerics;
+#endif
using System.Reflection;
using System.Runtime.Serialization;
using Newtonsoft.Json.Linq;
@@ -665,8 +667,10 @@ private object EnsureType(JsonReader reader, object value, CultureInfo culture,
return Enum.ToObject(contract.NonNullableUnderlyingType, value);
}
+#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
if (value is BigInteger)
return ConvertUtils.FromBigInteger((BigInteger)value, targetType);
+#endif
return Convert.ChangeType(value, contract.NonNullableUnderlyingType, culture);
}

0 comments on commit f58071c

Please sign in to comment.