${iServerJava6R_Query_ResourceInfo_Title}

${iServerJava6R_Query_ResourceInfo_Description}

        /// <summary>${iServerJava6R_ThemeResult_method_FromJson_D}</summary>
        /// <returns>${iServerJava6R_ThemeResult_method_FromJson_return}</returns>
        /// <param name="jsonResult">${iServerJava6R_ThemeResult_method_FromJson_param_jsonObject}</param>
        public static ThemeResult FromJson(string jsonResult)
        {
            JsonObject resultObject = (JsonObject)JsonValue.Parse(jsonResult);
            ResourceInfo resourceInfo = new ResourceInfo
            {
                NewResourceID = resultObject["newResourceID"],
                NewResourceLocation = resultObject["newResourceLocation"],
                Succeed = (bool)resultObject["succeed"]
            };

            ThemeResult themeResult = new ThemeResult
            {
                ResourceInfo = resourceInfo
            };
            return themeResult;
        }
        /// <summary>${iServerJava6R_ResultSet_method_fromJson_D}</summary>
        /// <returns>${iServerJava6R_ResultSet_method_fromJson_return}</returns>
        /// <param name="json">${iServerJava6R_ResultSet_method_fromJson_param_jsonObject}</param>
        public static QueryResult FromJson(JsonObject json)
        {
            if (json == null)
            {
                return null;
            }

            QueryResult result = new QueryResult();

            if (json.ContainsKey("totalCount") && json.ContainsKey("currentCount") && json.ContainsKey("customResponse") && json.ContainsKey("recordsets"))
            {
                result.TotalCount = (int)json["totalCount"];

                if ((int)json["totalCount"] == 0)
                {
                    return null;
                }

                result.CurrentCount = (int)json["currentCount"];
                result.CustomResponse = (string)json["customResponse"];

                JsonArray recordsets = (JsonArray)json["recordsets"];
                if (recordsets != null && recordsets.Count > 0)
                {
                    result.Recordsets = new List<Recordset>();

                    for (int i = 0; i < recordsets.Count; i++)
                    {
                        result.Recordsets.Add(Recordset.FromJson((JsonObject)recordsets[i]));
                    }
                }
                return result;
            }
            else if (json.ContainsKey("succeed") && json.ContainsKey("newResourceLocation"))
            {
                ResourceInfo info = new ResourceInfo();
                info.Succeed = (bool)json["succeed"];
                info.NewResourceLocation = (string)json["newResourceLocation"];
                info.NewResourceID = (string)json["newResourceID"];
                result.ResourceInfo = info;
                return result;
            }
            return null;
        }