/// <summary> /// 解压缩 /// </summary> /// <param name="input"></param> /// <returns></returns> public static string Decompress(string input) { List <List <object> > packed = JsonConvert.DeserializeObject <List <List <object> > >(input); return(JsonConvert.SerializeObject(JSONH.unpack(packed))); }
/// <summary> /// 压缩 /// </summary> /// <param name="input"></param> /// <returns></returns> public static string Compress(string input) { List <Dictionary <string, object> > unpacked = JsonConvert.DeserializeObject <List <Dictionary <string, object> > >(input); return(JsonConvert.SerializeObject(JSONH.pack(unpacked, 0))); }