hi i got the solution for my problem...i just need to make some changes in web.config file for my endpoint behavior...
<webhttp defaultoutgoingresponseformat="Json" automaticformatselectionenabled="True" />
and now it is working well...Thnks for your consideration..
and in order to serialize the list<students>() into Json i used JavaScriptSerializer
public string getStudentArray()
{
using (StudentsEntities ctx = new StudentsEntities())
{
var oSerializer = new System.Web.Script.Serialization.JavaScriptSerializer();
string sJSON = oSerializer.Serialize((from s in ctx.Students select s).ToList());
return sJSON;
}
}