You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ns...@apache.org on 2015/10/25 07:01:32 UTC
thrift git commit: THRIFT-3376 C# and Python JSON protocol double
values lose precision Client: C# Patch: Nobuaki Sukegawa
Repository: thrift
Updated Branches:
refs/heads/master c8abd34ae -> 4eb24f8f1
THRIFT-3376 C# and Python JSON protocol double values lose precision Client: C# Patch: Nobuaki Sukegawa
Use "G17" instead of "R" due to .NET Framework issue.
Closes #659
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/4eb24f8f
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/4eb24f8f
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/4eb24f8f
Branch: refs/heads/master
Commit: 4eb24f8f1a96bb7e6a0e45de503532a145992d05
Parents: c8abd34
Author: Nobuaki Sukegawa <ns...@apache.org>
Authored: Sun Oct 25 11:28:54 2015 +0900
Committer: Nobuaki Sukegawa <ns...@apache.org>
Committed: Sun Oct 25 13:31:50 2015 +0900
----------------------------------------------------------------------
lib/csharp/src/Protocol/TJSONProtocol.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/4eb24f8f/lib/csharp/src/Protocol/TJSONProtocol.cs
----------------------------------------------------------------------
diff --git a/lib/csharp/src/Protocol/TJSONProtocol.cs b/lib/csharp/src/Protocol/TJSONProtocol.cs
index 88d554e..9d51c74 100644
--- a/lib/csharp/src/Protocol/TJSONProtocol.cs
+++ b/lib/csharp/src/Protocol/TJSONProtocol.cs
@@ -505,7 +505,7 @@ namespace Thrift.Protocol
private void WriteJSONDouble(double num)
{
context.Write();
- String str = num.ToString("R", CultureInfo.InvariantCulture);
+ String str = num.ToString("G17", CultureInfo.InvariantCulture);
bool special = false;
switch (str[0])