Пример #1
0
        public int CountRequestJson(string json)                                                // Returns number of parameters in JSON string
        {
            RootGetEvent myjson   = JsonConvert.DeserializeObject <RootGetEvent>(json);
            int          property = myjson.result.Count;

            return(property);
        }
Пример #2
0
        public string ReadRequestJson(string json, int order, int key)                          //      Uses the JSON string, the order number and number key (Ref. Sony remote camera API reference document)
        {
            RootGetEvent myjson   = JsonConvert.DeserializeObject <RootGetEvent>(json);
            string       property = myjson.result[order][key].ToString();

            return(property);
        }
Пример #3
0
        public string ReadRequestJson(string json)                                              //      Uses only the JSON string (Ref. Sony remote camera API reference document)
        {
            RootGetEvent myjson   = JsonConvert.DeserializeObject <RootGetEvent>(json);
            string       property = myjson.result.ToString();

            return(property);
        }
Пример #4
0
        public string ReadRequestJson(string json, int order, int item, string key)             // Reads JSON format and returns specified property:
        {
            RootGetEvent myjson   = JsonConvert.DeserializeObject <RootGetEvent>(json);
            string       property = myjson.result[order][item][key].ToString();

            return(property);
        }