Cannot Serialize Lists of Structs in C#
---------------------------------------

                 Key: THRIFT-1258
                 URL: https://issues.apache.org/jira/browse/THRIFT-1258
             Project: Thrift
          Issue Type: Bug
          Components: C# - Compiler
    Affects Versions: 0.6.1
         Environment: Windows 7
            Reporter: Mike Morton
            Priority: Blocker


1. Create a file called test.thrift with the following content:


struct TestStruct {
  1: i32 id
  2: string name
}


service TestService {

        list<TestStruct> GetTestStructs(1: i32 id)

}

2. Execute the following at the command line: thrift-0.6.1.exe --gen csharp 
test.thrift

3. Open gen-csharp\TestService.cs and scroll down to line 298

Note that oprot.WriteListEnd(); is inside the foreach loop.  This means that 
this code will fail for any List that has more than one item.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to