LINQ to JSon response

I have posted my class below and with sample data. I need to pass this class as an json response.

public class Student
    public string Fname {get;set;}
    public string FirstSemMarkcsv {get;set;}  //This should hold marks as comma separated values.
    public string SecondSemMarkcsv {get;set;}  //This should hold marks as comma separated values.

Sample Data

Fname     FirstSemMark       SecondSemMark
John               95                  90
John               80                  93
John               70                  80
Peter              60                  78
Peter              80                  80
Peter              90                  85

I need to pass this as json response.

Any thoughts please.




List<Student> students = GetStudentList();
return Json(students));

Need Your Help

Hide Action Bar in a Fragment Activity

android android-fragmentactivity android-actionbar-compat android-actionbaractivity

I am creating the framework for an app and wish to hide the action bar for the login activity. The app is going to be entirely composed of fragments because they are awesome.