using System.Net.Http.Json;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Collections.Immutable;
namespace Habibi.Controllers
public class HomeController : Controller
public int count { get; set; }
public int total_pages_count { get; set; }
public List<Product> products { get; set; }
public string title { get; set; }
public string subtitle { get; set; }
public long id { get; set; }
public int current_price { get; set; }
public int old_price { get; set; }
public string availability { get; set; }
public string page_url { get; set; }
public List<string> categories { get; set; }
public string image_link { get; set; }
public List<string> image_links { get; set; }
public List<string> spec { get; set; }
public string short_desc { get; set; }
public ActionResult Index()
products = new List<Product>()
var product = new Product
title = "the prodct title",
subtitle = "the subtitle is here",
availability = "in stock ",
page_url = "https://example.com/something",
categories = new List<string>
image_link = "https://example.com/image_link/",
image_links = new List<string>
short_desc = "somthing short"
var jsonData = Newtonsoft.Json.JsonConvert.SerializeObject(z);
return Content(jsonData, "application/json");