Esempio n. 1
0
        public static string ConvertListToJson(List <string> list)
        {
            if (list == null)
            {
                return(null);
            }
            JSONArray jsonarray = new JSONArray();

            foreach (string aData in list)
            {
                jsonarray.Add(new JSONData(aData));
            }
            return(jsonarray.ToString());
        }
Esempio n. 2
0
        public static string ConvertListToJson(List <String> list)
        {
            if (list == null)
            {
                return(null);
            }

            var jsonArray = new JSONArray();

            foreach (var listItem in list)
            {
                jsonArray.Add(new JSONData(listItem));
            }

            return(jsonArray.ToString());
        }