Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/Newtonsoft.Json.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamesNK <james@newtonking.com>2011-04-22 07:11:42 +0400
committerJamesNK <james@newtonking.com>2011-04-22 07:11:42 +0400
commit21a2a7e4f793e395987d60b3ae0296de885c5774 (patch)
treeeaa4a7a7fcb584b4ee4e22dc20a309b5476898f7 /Src/Newtonsoft.Json
parent2c190ec438187affa34b161bfecf65bcf626cacb (diff)
-Demo
-Changed build script to support NuGet profiles
Diffstat (limited to 'Src/Newtonsoft.Json')
-rw-r--r--Src/Newtonsoft.Json/Properties/AssemblyInfo.cs4
-rw-r--r--Src/Newtonsoft.Json/Utilities/MiscellaneousUtils.cs6
2 files changed, 6 insertions, 4 deletions
diff --git a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs
index 855dcfe..75ed64f 100644
--- a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs
+++ b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs
@@ -108,9 +108,9 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("4.2.0.0")]
+[assembly: AssemblyVersion("4.0.2.0")]
#if !PocketPC
-[assembly: AssemblyFileVersion("4.2.13610.1823")]
+[assembly: AssemblyFileVersion("4.0.2.13622")]
#endif
[assembly: CLSCompliant(true)]
diff --git a/Src/Newtonsoft.Json/Utilities/MiscellaneousUtils.cs b/Src/Newtonsoft.Json/Utilities/MiscellaneousUtils.cs
index 84375eb..1cb44fc 100644
--- a/Src/Newtonsoft.Json/Utilities/MiscellaneousUtils.cs
+++ b/Src/Newtonsoft.Json/Utilities/MiscellaneousUtils.cs
@@ -21,12 +21,14 @@ namespace Newtonsoft.Json.Utilities
if (objA == null && objB != null)
return false;
+ // comparing an Int32 and Int64 both of the same value returns false
+ // make types the same then compare
if (objA.GetType() != objB.GetType())
{
if (ConvertUtils.IsInteger(objA) && ConvertUtils.IsInteger(objB))
- return Convert.ToDecimal(objA).Equals(Convert.ToDecimal(objB));
+ return Convert.ToDecimal(objA, CultureInfo.CurrentCulture).Equals(Convert.ToDecimal(objB, CultureInfo.CurrentCulture));
else if ((objA is double || objA is float || objA is decimal) && (objB is double || objB is float || objB is decimal))
- return MathUtils.ApproxEquals(Convert.ToDouble(objA), Convert.ToDouble(objB));
+ return MathUtils.ApproxEquals(Convert.ToDouble(objA, CultureInfo.CurrentCulture), Convert.ToDouble(objB, CultureInfo.CurrentCulture));
else
return false;
}