[ 
https://issues.apache.org/jira/browse/THRIFT-1148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nils Hügelmann updated THRIFT-1148:
-----------------------------------

    Description: 
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

  was:
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.



> 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

Reply via email to