From 83693531db0893f59178991b20a0efb16a403004 Mon Sep 17 00:00:00 2001 From: Jake Farrell Date: Thu, 14 Apr 2011 14:30:25 +0000 Subject: [PATCH] Thrift-1131: C# JSON Protocol is unable to decode escaped characters in string Client lib: csharp Patch: Maciek Weksej C# JSON Protocol throws TProtocolException after meeting an escaped character in UTF8 string, this casts the value being read to avoid this. git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1092282 13f79535-47bb-0310-9956-ffa450edef68 --- lib/csharp/src/Protocol/TJSONProtocol.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/csharp/src/Protocol/TJSONProtocol.cs b/lib/csharp/src/Protocol/TJSONProtocol.cs index 7c88f0fb..5f6351f7 100644 --- a/lib/csharp/src/Protocol/TJSONProtocol.cs +++ b/lib/csharp/src/Protocol/TJSONProtocol.cs @@ -744,7 +744,7 @@ namespace Thrift.Protocol } else { - int off = Array.IndexOf(ESCAPE_CHARS, ch); + int off = Array.IndexOf(ESCAPE_CHARS, (char)ch); if (off == -1) { throw new TProtocolException(TProtocolException.INVALID_DATA, -- 2.17.1