星火直播PC
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ZCache.cs 680B

123456789101112131415161718192021222324
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace XHZB.Desktop.Utils
  9. {
  10. internal class ZCache
  11. {
  12. public static Dictionary<string, string> headDic = new Dictionary<string, string>();
  13. internal static List<T> JsonToList<T>(string respstr)
  14. {
  15. JsonSerializer serializer = new JsonSerializer();
  16. StringReader sr = new StringReader(respstr);
  17. object o = serializer.Deserialize(new JsonTextReader(sr), typeof(List<T>));
  18. List<T> list = o as List<T>;
  19. return list;
  20. }
  21. }
  22. }