示例#1
0
        /// <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)));
        }
示例#2
0
        /// <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)));
        }