I\'ve read all the questions regarding this issue but didn\'t manage to solve it...
The Score class:
public class Score
{
// default constructor
I'm passing arrays of custom objects into List in web methods and it works just fine.
I'm, guessing that you're having a small JSON formatting issue because of the quotes around the property names. Try changing your object to this :
var scoresList = [{TraitID:1, TraitScore:2}, {TraitID:2, TraitScore:5}];
and change your data line to this :
data: JSON.stringify({ scores : scoresList }),
Hope that helps...
UPDATE: working example...
Here's the codebehind :
public class Score
{ // default constructor
public Score() { }
public int TraitID { get; set; }
public double TraitScore { get; set; }
}
[WebMethod]
public static bool Test( List scores )
{
return true;
}