You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2018/03/12 15:56:38 UTC

[06/13] tinkerpop git commit: Make decimal serialization in Gremlin.Net culture independent CTR

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/TINKERPOP-1896
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);
         }