0

{"result":1,"message":"Client app loaded","extras":{"jobs":{"5":{"jobName":"Ford Otomobil Afi\u015fi","jobMaxIdleTime":"2060","jobMaxTime":"2040"}},"customers":{"8":"Seker LTD"}}}

public class Extras
        {
            public string loginID { get; set; }
            public string loginToken { get; set; }
            public string employeesNameSurname { get; set; }
            public string employeesLanguage { get; set; }

            public Dictionary<string, string> jobs { get; set; }
            public Dictionary<string, string> customers { get; set; }

        }

 public class Dict
        {
            public int result { get; set; }
            public string message { get; set; }
            public Extras extras { get; set; }

        }

public Dictionary jobs { get; set; } // ERROR

I can not get data from "Jobs"

1
  • Please make clear what it is you want to do and what you have tried so far. Commented Jan 26, 2013 at 18:40

2 Answers 2

4

There is a similar post regarding this. See if this is of any help to you.

Sign up to request clarification or add additional context in comments.

Comments

1
    using System;
using Newtonsoft.Json;

namespace {

    [Serializable]
     class  {

        public int Result;
        public string Message;
        public Extras Extras;

        //Empty Constructor
        public (){}

        public string Serialize()
        {
            return JsonConvert.SerializeObject(this);
        }
        public static  FromJson(string json)
        {
            return JsonConvert.DeserializeObject<>(json);
        }
    }


    [Serializable]
     class 5 {

        public string JobName;
        public string JobMaxIdleTime;
        public string JobMaxTime;

        //Empty Constructor
        public 5(){}

    }


    [Serializable]
     class Jobs {

        public 5 5;

        //Empty Constructor
        public Jobs(){}

    }


    [Serializable]
     class Customers {

        public string 8;

        //Empty Constructor
        public Customers(){}

    }


    [Serializable]
     class Extras {

        public Jobs Jobs;
        public Customers Customers;

        //Empty Constructor
        public Extras(){}

    }

}

1 Comment

System.Web.Script.Serialization anywhere using the project using. Can you use it?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.