مرجع تخصصی برنامه نویسان

انجمن تخصصی برنامه نویسان فارسی زبان

کاربر سایت

sadegh.n

عضویت از 1394/10/14

JSON

  • پنجشنبه 23 اردیبهشت 1395
  • 10:02
تشکر میکنم

سلام

خسته نباشید.  ما از طریق JSON  اطلاعاتمون رو دریافت میکنیم ولی اطلاعات contect و video رو میده ولی بقیه رو  NULL میده حالا مشکل ما کجاست اگه ممکنه کمک کنید

اینم کدمون

 

public class InfoMaps
    {
        public int id { get; set; }
        public string code { get; set; }
        public string name { get; set; }
        public string type { get; set; }
        public int createdate { get; set; }
        public int expiredate { get; set; }
        public string active { get; set; }
        public string parent { get; set; }
        public int ownerid { get; set; }
        public string lat { get; set; }
        public string lng { get; set; }
        public int catid { get; set; }
        public string address { get; set; }
        public int stat { get; set; }
        public string followers { get; set; }
        public object wgcode { get; set; }
        public object city { get; set; }
        public object state { get; set; }
        public object country { get; set; }
    }

    public class Contacts
    {
        public int id { get; set; }
        public int jobid { get; set; }
        public string phone { get; set; }
        public string mobile { get; set; }
        public object email { get; set; }
        public object web { get; set; }
    }

    public class Img
    {
        public int id { get; set; }
        public string name { get; set; }
        public string ownerid { get; set; }
        public string jobid { get; set; }
        public string address { get; set; }
    }

    public class Item
    {
        public int id { get; set; }
        public string name { get; set; }
        public string link { get; set; }
        public int price { get; set; }
        public string ownerid { get; set; }
        public string jobid { get; set; }
        public string img { get; set; }
        public string imgaddress { get; set; }
    }

    public class SearchedJobList
        {
        public InfoMaps mapinfo { get; set; }
    public Contacts contacts { get; set; }
    public string qrcode { get; set; }
    public object logo { get; set; }
    public string video { get; set; }
    public IList<Img> imgs { get; set; }
    public IList<Item> items { get; set; }
    public string comment { get; set; }
    public object cover { get; set; }
    public object workhours { get; set; }
}

 

ممنون از راهنماییهاتون

پاسخ های این پرسش

تعداد پاسخ ها : 4 پاسخ
کاربر سایت

ایمان مدائنی

عضویت از 1392/01/20

  • پنجشنبه 23 اردیبهشت 1395
  • 12:24

لطفا برای درج کد از کلید کد در ادیتور استفاده کنید

کدهاتون قابل خوندن نیست

کاربر سایت

shahin060

عضویت از 1393/11/24

  • پنجشنبه 23 اردیبهشت 1395
  • 14:01

public class InfoMaps
    {
        public int id { get; set; }
        public string code { get; set; }
        public string name { get; set; }
        public string type { get; set; }
        public int createdate { get; set; }
        public int expiredate { get; set; }
        public string active { get; set; }
        public string parent { get; set; }
        public int ownerid { get; set; }
        public string lat { get; set; }
        public string lng { get; set; }
        public int catid { get; set; }
        public string address { get; set; }
        public int stat { get; set; }
        public string followers { get; set; }
        public object wgcode { get; set; }
        public object city { get; set; }
        public object state { get; set; }
        public object country { get; set; }
    }

    public class Contacts
    {
        public int id { get; set; }
        public int jobid { get; set; }
        public string phone { get; set; }
        public string mobile { get; set; }
        public object email { get; set; }
        public object web { get; set; }
    }

    public class Img
    {
        public int id { get; set; }
        public string name { get; set; }
        public string ownerid { get; set; }
        public string jobid { get; set; }
        public string address { get; set; }
    }

    public class Item
    {
        public int id { get; set; }
        public string name { get; set; }
        public string link { get; set; }
        public int price { get; set; }
        public string ownerid { get; set; }
        public string jobid { get; set; }
        public string img { get; set; }
        public string imgaddress { get; set; }
    }

    public class SearchedJobList
        {
        public InfoMaps mapinfo { get; set; }
    public Contacts contacts { get; set; }
    public string qrcode { get; set; }
    public object logo { get; set; }
    public string video { get; set; }
    public IList<Img> imgs { get; set; }
    public IList<Item> items { get; set; }
    public string comment { get; set; }
    public object cover { get; set; }
    public object workhours { get; set; }
}

 

 

کاربر سایت

ایمان مدائنی

عضویت از 1392/01/20

  • پنجشنبه 23 اردیبهشت 1395
  • 14:31

اینها فقط تعاریف Complex ها هستند

باید کدهاتون رو قرار بدید تا مشکل بررسی بشه

کاربر سایت

shahin060

عضویت از 1393/11/24

  • پنجشنبه 23 اردیبهشت 1395
  • 15:07
   public App2.Model.InfoJobs.SearchedJobList InfoJob(string Code)
        {

            System.Net.WebClient client = new System.Net.WebClient();
            client.Encoding = Encoding.UTF8;
            string path = string.Format("http://edux.ir/app/?mod=view&username={0}&password={1}&code={2}", Username, Password, Code);
            var response = client.DownloadString(path);
            var tmpLists  = Newtonsoft.Json.JsonConvert.DeserializeObject<Model.InfoJobs.SearchedJobList>(response);
           
            return tmpLists;
          
        }

 

کاربرانی که از این پست تشکر کرده اند

هیچ کاربری تا کنون از این پست تشکر نکرده است

اگر نیاز به یک مشاور در زمینه طراحی سایت ، برنامه نویسی و بازاریابی الکترونیکی دارید

با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)