I have this class :
public class DesignElements
{
public List<DesignElement> Elements;
public bool Front { set; get; }
public string ThemeID { set; get; }
public DesignElements()
{
Elements = new List<DesignElement>();
}
}
result of serializing this class to page is :
var json=
{
"Elements":
[
{"Alignment":null,"Bold":false},
{"Alignment":null,"Bold":false}
],
"Front":true,
"ThemeID":"9"
};
problem is sending this json in page to web-service with jQuery
should I use the
JSON.stringify
method and sent it as as string ? if yes what is the name of argument in web-service ?can I send json as
DesignElements
object to web-service. if yes what is the name of Argument in web-service ?