You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Nils Hügelmann (JIRA)" <ji...@apache.org> on 2011/04/16 21:08:05 UTC
[jira] [Commented] (THRIFT-1148) list<> type with multiple items is
not encoded properly in JSONProtocol
[ https://issues.apache.org/jira/browse/THRIFT-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020646#comment-13020646 ]
Nils Hügelmann commented on THRIFT-1148:
----------------------------------------
found a stacktrace
System.InvalidOperationException: Operation is not valid due to the current state of the object
at System.Collections.Generic.Stack`1[Thrift.Protocol.TJSONProtocol+JSONBaseContext].Pop () [0x00058] in /usr/src/packages/BUILD/mono-2.10.1/mcs/class/System/System.Collections.Generic/Stack.cs:127
at Thrift.Protocol.TJSONProtocol.PopContext () [0x00000] in /home/nils/Documents/_Projekte/thrift/trunk/lib/csharp/src/Protocol/TJSONProtocol.cs:366
at Thrift.Protocol.TJSONProtocol.WriteJSONArrayEnd () [0x00000] in /home/nils/Documents/_Projekte/thrift/trunk/lib/csharp/src/Protocol/TJSONProtocol.cs:585
at Thrift.Protocol.TJSONProtocol.WriteMessageEnd () [0x00000] in /home/nils/Documents/_Projekte/thrift/trunk/lib/csharp/src/Protocol/TJSONProtocol.cs:603
at Communication.Client.ClientService+Processor.test_Process (Int32 seqid, Thrift.Protocol.TProtocol iprot, Thrift.Protocol.TProtocol oprot) [0x00043] in /home/nils/Documents/_Projekte/anonymox/server/apps/shared/thrift/gen-csharp/Communication/Client/ClientService.cs:268
at Communication.Client.ClientService+Processor.Process (Thrift.Protocol.TProtocol iprot, Thrift.Protocol.TProtocol oprot) [0x00086] in /home/nils/Documents/_Projekte/anonymox/server/apps/shared/thrift/gen-csharp/Communication/Client/ClientService.cs:211
at Thrift.Transport.THttpHandler.ProcessRequest (System.IO.Stream input, System.IO.Stream output) [0x0001f] in /home/nils/Documents/_Projekte/thrift/src/Transport/THttpHandler.cs:77
> list<> type with multiple items is not encoded properly in JSONProtocol
> ------------------------------------------------------------------------
>
> Key: THRIFT-1148
> URL: https://issues.apache.org/jira/browse/THRIFT-1148
> Project: Thrift
> Issue Type: Bug
> Components: C# - Library
> Affects Versions: 0.6.1
> Reporter: Nils Hügelmann
>
> thrift definition
> service Foo{
> list<i32> test()
> }
> c# implementation
> public List<int> test ()
> {
> return new List<int>{
> 42,4242
> };
> }
> produces:
> [1,"test",2,0,{"0":{"lst":["i32",2,42],"4242"]}}
> reformatted:
> [1,"test",2,0,
> {
> "0":{
> "lst":["i32",2,42],"4242"]
> }
> }
> it works as expected with only one item in the list.
> [EDIT] Tried to correct formatting/intendations
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira