0

{"result":1,"message":"Client app loaded","extras":{"jobs":{"5":{"jobName":"Ford Otomobil Afi\u015fi","jobMaxIdleTime":"2060 ","jobMaxTime":"2040"}},"顧客":{"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; }

        }

公共辞書の仕事{取得; 設定; } // エラー

「ジョブ」からデータを取得できません

4

2 に答える 2

4

これについては、同様の投稿があります。これがあなたに役立つかどうかを確認してください。

于 2013-01-26T18:41:55.877 に答える
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(){}

    }

}
于 2013-01-26T18:40:20.907 に答える