score:1

Accepted answer

silly me... in order for the json to recognize it as an array field...

instead of doing this...

objList.data[0] = 100;

I should've done it like this...

 objlist = new GenList();
 objList.name = "TEST";
 objList.data = new [] {100};
 objGenList.add(objList);

the output would be

{ name : "TEST1", data : [100]}

score:1

Your method isn't returning anything, does adding this this work?

return objGenList;


Related Articles