一篇文章讲明白Json串压缩转义

简介: 一篇文章讲明白Json串压缩转义

1、登陆地址:

2、 压缩前:【{ "domainid": "00000000000111", "billtype": "1", "formno": "2021000100006", "formid": "1A3046838CAE46A4840266D4CE0DC563", "createuserno": "zhangsan", "createusername": "createusername", "deptno": "0103", "deptname": "财务部", "contractno": "abc0001", "contractname": "付款合同001", "contractbalance": "30000000", "relatedunitname": "神舟软件", "reason": "报销办公费", "budgetinfo": 【{ "budgetid": "01001001", "budgetname": "办公费", "budgetno": "01001001", "budgetyear": "2021", "budgettype": "FeiYong", "hsdw": "000012", "hsdwmc": "物流事业账套" }】, "expenditureinfo": 【{ "expenditureid": "01001001", "expenditurename": "办公费1", "expenditurecash": "100" }, { "expenditureid": "01001002", "expenditurename": "办公费2", "expenditurecash": "200" }】, "taskinfo": 【{ "taskid": "01001001", "taskname": "办公费", "taskcash": "100" }, { "taskid": "01001001", "taskname": "办公费", "taskcash": "200" }】, "offsetinfo": 【{ "formno": "20210100003", "formcash": "30000", "offsetcash": "30000", "bccd": "100" }, { "formno": "20210100003", "formcash": "30000", "offsetcash": "30000", "bccd": "100" }】, "postponecash":"300", "payeeinfo": 【{ "TendererNo": "zhangsan", "TendererName": "张三", "payway": "入银行卡", "Remittee": "中国电信", "RemitteeBank": "工行", "RemitteeAccount": "1001200230034002", "cash": "100" }, { "TendererNo": "zhangsan", "TendererName": "张三", "payway": "入银行卡", "Remittee": "中国电信", "RemitteeBank": "工行", "RemitteeAccount": "1001200230034002", "cash": "100" }】 }, { "domainid": "00000000000111", "billtype": "1", "formno": "2021000100006", "formid": "1A3046838CAE46A4840266D4CE0DC563", "createuserno": "zhangsan", "createusername": "createusername", "deptno": "0103", "deptname": "财务部", "contractno": "abc0001", "contractname": "付款合同001", "contractbalance": "30000000", "relatedunitname": "北京神州航天软件技术有限公司", "reason": "报销办公费", "budgetinfo": 【{ "budgetid": "01001001", "budgetname": "办公费", "budgetno": "01001001", "budgetyear": "2021", "hsdw": "000012", "hsdwmc": "物流事业账套" }】, "expenditureinfo": 【{ "expenditureid": "01001001", "expenditurename": "办公费1", "expenditurecash": "100" }, { "expenditureid": "01001002", "expenditurename": "办公费2", "expenditurecash": "200" }】, "taskinfo": 【{ "taskid": "01001001", "taskname": "办公费", "taskcash": "100" }, { "taskid": "01001001", "taskname": "办公费", "taskcash": "200" }】, "offsetinfo": 【{ "formno": "20210100003", "formcash": "30000", "offsetcash": "30000", "bccd": "100" }, { "formno": "20210100003", "formcash": "30000", "offsetcash": "30000", "bccd": "100" }】, "postponecash":"300", "payeeinfo": 【{ "TendererNo": "zhangsan", "TendererName": "张三", "payway": "入银行卡", "Remittee": "中国电信", "RemitteeBank": "工行", "RemitteeAccount": "1001200230034002", "cash": "100" }, { "TendererNo": "zhangsan", "TendererName": "张三", "payway": "入银行卡", "Remittee": "中国电信", "RemitteeBank": "工行", "RemitteeAccount": "1001200230034002", "cash": "100" }】 //代码效果参考:http://www.zidongmutanji.com/zsjx/257477.html

}】

压缩转义后:

【{\"domainid\":\"00000000000111\",\"billtype\":\"1\",\"formno\":\"2021000100006\",\"formid\":\"1A3046838CAE46A4840266D4CE0DC563\",\"createuserno\":\"zhangsan\",\"createusername\":\"createusername\",\"deptno\":\"0103\",\"deptname\":\"财务部\",\"contractno\":\"abc0001\",\"contractname\":\"付款合同001\",\"contractbalance\":\"30000000\",\"relatedunitname\":\"神舟软件\",\"reason\":\"报销办公费\",\"budgetinfo\":【{\"budgetid\":\"01001001\",\"budgetname\":\"办公费\",\"budgetno\":\"01001001\",\"budgetyear\":\"2021\",\"budgettype\":\"FeiYong\",\"hsdw\":\"000012\",\"hsdwmc\":\"物流事业账套\"}】,\"expenditureinfo\":【{\"expenditureid\":\"01001001\",\"expenditurename\":\"办公费1\",\"expenditurecash\":\"100\"},{\"expenditureid\":\"01001002\",\"expenditurename\":\"办公费2\",\"expenditurecash\":\"200\"}】,\"taskinfo\":【{\"taskid\":\"01001001\",\"taskname\":\"办公费\",\"taskcash\":\"100\"},{\"taskid\":\"01001001\",\"taskname\":\"办公费\",\"taskcash\":\"200\"}】,\"offsetinfo\":【{\"formno\":\"20210100003\",\"formcash\":\"30000\",\"offsetcash\":\"30000\",\"bccd\":\"100\"},{\"formno\":\"20210100003\",\"formcash\":\"30000\",\"offsetcash\":\"30000\",\"bccd\":\"100\"}】,\"postponecash\":\"300\",\"payeeinfo\":【{\"TendererNo\":\"zhangsan\",\"TendererName\":\"张三\",\"payway\":\"入银行卡\",\"Remittee\":\"中国电信\",\"RemitteeBank\":\"工行\",\"RemitteeAccount\":\"1001200230034002\",\"cash\":\"100\"},{\"TendererNo\":\"zhangsan\",\"TendererName\":\"张三\",\"payway\":\"入银行卡\",\"Remittee\":\"中国电信\",\"RemitteeBank\":\"工行\",\"RemitteeAccount\":\"1001200230034002\",\"cash\":\"100\"}】},{\"domainid\":\"00000000000111\",\"billtype\":\"1\",\"formno\":\"2021000100006\",\"formid\":\"1A3046838CAE46A4840266D4CE0DC563\",\"createuserno\":\"zhangsan\",\"createusername\":\"createusername\",\"deptno\":\"0103\",\"deptname\":\"财务部\",\"contractno\":\"abc0001\",\"contractname\":\"付款合同001\",\"contractbalance\":\"30000000\",\"relatedunitname\":\"北京神州航天软件技术有限公司\",\"reason\":\"报销办公费\",\"budgetinfo\":【{\"budgetid\":\"01001001\",\"budgetname\":\"办公费\",\"budgetno\":\"01001001\",\"budgetyear\":\"2021\",\"hsdw\":\"000012\",\"hsdwmc\":\"物流事业账套\"}】,\"expenditureinfo\":【{\"expenditureid\":\"01001001\",\"expenditurename\":\"办公费1\",\"expenditurecash\":\"100\"},{\"expenditureid\":\"01001002\",\"expenditurename\":\"办公费2\",\"expenditurecash\":\"200\"}】,\"taskinfo\":【{\"taskid\":\"01001001\",\"taskname\":\"办公费\",\"taskcash\":\"100\"},{\"taskid\":\"01001001\",\"taskname\":\"办公费\",\"taskcash\":\"200\"}】,\"offsetinfo\":【{\"formno\":\"20210100003\",\"formcash\":\"30000\",\"offsetcash\":\"30000\",\"bccd\":\"100\"},{\"formno\":\"20210100003\",\"formcash\":\"30000\",\"offsetcash\":\"30000\",\"bccd\":\"100\"}】,\"postponecash\":\"300\",\"payeeinfo\":【{\"TendererNo\":\"zhangsan\",\"TendererName\":\"张三\",\"payway\":\"入银行卡\",\"Remittee\":\"中国电信\",\"RemitteeBank\":\"工行\",\"RemitteeAccount\":\"1001200230034002\",\"cash\":\"100\"},{\"TendererNo\":\"zhangsan\",\"TendererName\":\"张三\",\"payway\":\"入银行卡\",\"Remittee\":\"中国电信\",\"RemitteeBank\":\"工行\",\"RemitteeAccount\":\"1001200230034002\",\"cash\":\"100\"}】}】

//代码效果参考:http://www.zidongmutanji.com/zsjx/49521.html

生命在于运动,生活在于奋斗!
相关文章
|
7月前
|
JSON 缓存 Java
Springboot 之 Filter 实现超大响应 JSON 数据压缩
Springboot 之 Filter 实现超大响应 JSON 数据压缩
184 0
|
6月前
|
JSON JavaScript 前端开发
一篇文章讲明白json文件格式详解
一篇文章讲明白json文件格式详解
116 0
|
6月前
|
XML JSON 开发框架
一篇文章讲明白JSON格式转换成XML格式
一篇文章讲明白JSON格式转换成XML格式
40 0
|
7月前
|
JSON fastjson Java
java fastJson 转JSON 两个转义
【2月更文挑战第14天】
428 2
|
7月前
|
XML 存储 JSON
C# 对象存储 (轻松实现序列化 | Xml | Json | 加密 | 压缩 | 注册表 | Redis)
开发时经常会遇到需要保存配置的情况,最常见的实现方式是将对象序列化成Json,再写入文件并保存到本地磁盘。 本文将使用开源库**ApeFree.DataStore**来替换原有的对象存储过程,实现一个可以随意切换存储方式的对象存储方法。 ApeFree.DataStore是一款可配置的对象存储库,支持在不同平台/介质中对内存中的对象进行存储与还原(如本地存储、注册表存储)。支持配置序列化格式(如Json、Xml),支持配置压缩算法(如GZip、Defalte),支持配置加密算法(如AES、RSA)。
138 0
C# 对象存储 (轻松实现序列化 | Xml | Json | 加密 | 压缩 | 注册表 | Redis)
|
7月前
|
存储 JSON NoSQL
Springboot 之 Filter 实现 Gzip 压缩超大 json 对象
Springboot 之 Filter 实现 Gzip 压缩超大 json 对象
128 0
|
消息中间件 JSON JavaScript
Spring Boot + Filter 实现 Gzip 压缩超大 json 对象,传输耗时大大减少
Spring Boot + Filter 实现 Gzip 压缩超大 json 对象,传输耗时大大减少
|
JSON 数据格式
VSCode 多行JSON合并/压缩(compact)为一行 join Lines
VSCode 多行JSON合并/压缩(compact)为一行 join Lines
2898 0
VSCode 多行JSON合并/压缩(compact)为一行 join Lines
|
XML JSON 缓存
自定义变量、Nginx 访问日志转换为 json 及 Nginx gzip 压缩功能(二)|学习笔记
快速学习自定义变量、Nginx 访问日志转换为 json 及 Nginx gzip 压缩功能
314 0
自定义变量、Nginx 访问日志转换为 json 及 Nginx gzip 压缩功能(二)|学习笔记
|
前端开发 开发工具 git
一篇文章讲清楚关于package.json几点让人迷惑的知识点,建议收藏
一篇文章讲清楚关于package.json几点让人迷惑的知识点,建议收藏