星火直播PC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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. }