tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From florianhockm...@apache.org
Subject [1/6] tinkerpop git commit: Make decimal serialization in Gremlin.Net culture independent CTR
Date Sat, 10 Mar 2018 15:31:39 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/master b4013a2ac -> da63965ff
  refs/heads/tp32 552820a0c -> ab66ed384
  refs/heads/tp33 02e47ff96 -> 99b6da259


Make decimal serialization in Gremlin.Net culture independent CTR

This led tests fail on my system and probably leads to broken
serialization of gx:BigDecimal on systems with ',' as the decimal
separator.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ab66ed38
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ab66ed38
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ab66ed38

Branch: refs/heads/master
Commit: ab66ed384b8c95475755dff1c558e392e0cc7e8c
Parents: 552820a
Author: Florian Hockmann <fh@florian-hockmann.de>
Authored: Sat Mar 10 16:29:42 2018 +0100
Committer: Florian Hockmann <fh@florian-hockmann.de>
Committed: Sat Mar 10 16:29:42 2018 +0100

----------------------------------------------------------------------
 .../src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ab66ed38/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs
index 53dad94..8127415 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs
@@ -23,6 +23,7 @@
 
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using Newtonsoft.Json.Linq;
 
 namespace Gremlin.Net.Structure.IO.GraphSON
@@ -44,7 +45,7 @@ namespace Gremlin.Net.Structure.IO.GraphSON
             object value = objectData;
             if (StringifyValue)
             {
-                value = value?.ToString();
+                value = string.Format(CultureInfo.InvariantCulture, "{0}", value);
             }
             return GraphSONUtil.ToTypedValue(GraphSONTypeName, value, Prefix);
         }


Mime
View raw message