Esempio n. 1
0
        public static string GetJsonResponseCompact(Dictionary <string, object> dictionary)
        {
            string text = string.Empty;

            if (dictionary == null)
            {
                return(text);
            }
            int num = 0;

            text += "{";
            foreach (KeyValuePair <string, object> keyValuePair in dictionary)
            {
                string text2 = keyValuePair.Value as string;
                if (text2 != null)
                {
                    if (++num > 1)
                    {
                        text += ",";
                    }
                    string text3 = text;
                    text = string.Concat(new string[]
                    {
                        text3,
                        "\"",
                        keyValuePair.Key,
                        "\":\"",
                        text2,
                        "\""
                    });
                }
                else
                {
                    Dictionary <string, object> dictionary2 = keyValuePair.Value as Dictionary <string, object>;
                    if (++num > 1)
                    {
                        text += ",";
                    }
                    text  = text + "\"" + keyValuePair.Key + "\":";
                    text += AdjustUtils.GetJsonResponseCompact(dictionary2);
                }
            }
            text += "}";
            return(text);
        }
Esempio n. 2
0
 public string GetJsonResponse()
 {
     return(AdjustUtils.GetJsonResponseCompact(JsonResponse));
 }
Esempio n. 3
0
		public string GetJsonResponse()
		{
			return AdjustUtils.GetJsonResponseCompact(this.JsonResponse);
		}