using System.Collections.Generic;
namespace HelloWorldMvcApp
public class HomeController : Controller
public ActionResult Index()
public JsonResult GetJsonData()
Console.Write("getJoson");
var persons = new List<Person>
new Person{Id = 1, FirstName = "Manuel",
Addresses = new List<Address>
new Address{Line1 = "91255555"},
new Address{Line1 = "96852525"}
new Person{Id = 2, FirstName = "Luis",
Addresses = new List<Address>
new Address{Line1 = "888999666"},
new Address{Line1 = "912556363"}
return Json(persons, JsonRequestBehavior.AllowGet);
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public List<Address> Addresses { get; set; }
public string Line1 { get; set; }
public string Line2 { get; set; }
public string ZipCode { get; set; }
public string City { get; set; }
public string State { get; set; }
public string Country { get; set; }