不自重者,取辱。不自长者,取祸。不自满者,受益。不自足者,博闻。
URL上携带#json={json-string}可自动格式化 进入全屏
line

如题,FeHelper的在线JSON格式化功能,支持URL上直接携带一个Hash,格式为:

https://www.baidufe.com/fehelper/jsonformat.html#json={encodeURIComponent(json-string)}

注意:json-string必须经过encodeURIComponent编码过才可以。

如示例URL:https://www.baidufe.com/fehelper/jsonformat.html#json=%7B%22date%22%3A%2220180322%22%2C%22message%22%3A%22Success%20!%22%2C%22status%22%3A200%2C%22city%22%3A%22%E5%8C%97%E4%BA%AC%22%2C%22count%22%3A632%2C%22data%22%3A%7B%22shidu%22%3A%2234%25%22%2C%22pm25%22%3A73%2C%22pm10%22%3A91%2C%22quality%22%3A%22%E8%89%AF%22%2C%22wendu%22%3A%225%22%2C%22ganmao%22%3A%22%E6%9E%81%E5%B0%91%E6%95%B0%E6%95%8F%E6%84%9F%E4%BA%BA%E7%BE%A4%E5%BA%94%E5%87%8F%E5%B0%91%E6%88%B7%E5%A4%96%E6%B4%BB%E5%8A%A8%22%2C%22yesterday%22%3A%7B%22date%22%3A%2221%E6%97%A5%E6%98%9F%E6%9C%9F%E4%B8%89%22%2C%22sunrise%22%3A%2206%3A19%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2011.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%201.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A26%22%2C%22aqi%22%3A85%2C%22fx%22%3A%22%E5%8D%97%E9%A3%8E%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E5%A4%9A%E4%BA%91%22%2C%22notice%22%3A%22%E9%98%B4%E6%99%B4%E4%B9%8B%E9%97%B4%EF%BC%8C%E8%B0%A8%E9%98%B2%E7%B4%AB%E5%A4%96%E7%BA%BF%E4%BE%B5%E6%89%B0%22%7D%2C%22forecast%22%3A%5B%7B%22date%22%3A%2222%E6%97%A5%E6%98%9F%E6%9C%9F%E5%9B%9B%22%2C%22sunrise%22%3A%2206%3A17%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2017.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%201.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A27%22%2C%22aqi%22%3A98%2C%22fx%22%3A%22%E8%A5%BF%E5%8D%97%E9%A3%8E%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E6%99%B4%22%2C%22notice%22%3A%22%E6%84%BF%E4%BD%A0%E6%8B%A5%E6%9C%89%E6%AF%94%E9%98%B3%E5%85%89%E6%98%8E%E5%AA%9A%E7%9A%84%E5%BF%83%E6%83%85%22%7D%2C%7B%22date%22%3A%2223%E6%97%A5%E6%98%9F%E6%9C%9F%E4%BA%94%22%2C%22sunrise%22%3A%2206%3A16%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2018.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%205.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A28%22%2C%22aqi%22%3A118%2C%22fx%22%3A%22%E6%97%A0%E6%8C%81%E7%BB%AD%E9%A3%8E%E5%90%91%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E5%A4%9A%E4%BA%91%22%2C%22notice%22%3A%22%E9%98%B4%E6%99%B4%E4%B9%8B%E9%97%B4%EF%BC%8C%E8%B0%A8%E9%98%B2%E7%B4%AB%E5%A4%96%E7%BA%BF%E4%BE%B5%E6%89%B0%22%7D%2C%7B%22date%22%3A%2224%E6%97%A5%E6%98%9F%E6%9C%9F%E5%85%AD%22%2C%22sunrise%22%3A%2206%3A14%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2021.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%207.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A29%22%2C%22aqi%22%3A52%2C%22fx%22%3A%22%E8%A5%BF%E5%8D%97%E9%A3%8E%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E6%99%B4%22%2C%22notice%22%3A%22%E6%84%BF%E4%BD%A0%E6%8B%A5%E6%9C%89%E6%AF%94%E9%98%B3%E5%85%89%E6%98%8E%E5%AA%9A%E7%9A%84%E5%BF%83%E6%83%85%22%7D%2C%7B%22date%22%3A%2225%E6%97%A5%E6%98%9F%E6%9C%9F%E6%97%A5%22%2C%22sunrise%22%3A%2206%3A13%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2022.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%207.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A30%22%2C%22aqi%22%3A71%2C%22fx%22%3A%22%E8%A5%BF%E5%8D%97%E9%A3%8E%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E6%99%B4%22%2C%22notice%22%3A%22%E6%84%BF%E4%BD%A0%E6%8B%A5%E6%9C%89%E6%AF%94%E9%98%B3%E5%85%89%E6%98%8E%E5%AA%9A%E7%9A%84%E5%BF%83%E6%83%85%22%7D%2C%7B%22date%22%3A%2226%E6%97%A5%E6%98%9F%E6%9C%9F%E4%B8%80%22%2C%22sunrise%22%3A%2206%3A11%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2021.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%208.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A31%22%2C%22aqi%22%3A97%2C%22fx%22%3A%22%E8%A5%BF%E5%8D%97%E9%A3%8E%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E5%A4%9A%E4%BA%91%22%2C%22notice%22%3A%22%E9%98%B4%E6%99%B4%E4%B9%8B%E9%97%B4%EF%BC%8C%E8%B0%A8%E9%98%B2%E7%B4%AB%E5%A4%96%E7%BA%BF%E4%BE%B5%E6%89%B0%22%7D%5D%7D%7D

上面URL上拼接的json内容实则为:

{"date":"20180322","message":"Success !","status":200,"city":"北京","count":632,"data":{"shidu":"34%","pm25":73,"pm10":91,"quality":"良","wendu":"5","ganmao":"极少数敏感人群应减少户外活动","yesterday":{"date":"21日星期三","sunrise":"06:19","high":"高温 11.0℃","low":"低温 1.0℃","sunset":"18:26","aqi":85,"fx":"南风","fl":"<3级","type":"多云","notice":"阴晴之间,谨防紫外线侵扰"},"forecast":[{"date":"22日星期四","sunrise":"06:17","high":"高温 17.0℃","low":"低温 1.0℃","sunset":"18:27","aqi":98,"fx":"西南风","fl":"<3级","type":"晴","notice":"愿你拥有比阳光明媚的心情"},{"date":"23日星期五","sunrise":"06:16","high":"高温 18.0℃","low":"低温 5.0℃","sunset":"18:28","aqi":118,"fx":"无持续风向","fl":"<3级","type":"多云","notice":"阴晴之间,谨防紫外线侵扰"},{"date":"24日星期六","sunrise":"06:14","high":"高温 21.0℃","low":"低温 7.0℃","sunset":"18:29","aqi":52,"fx":"西南风","fl":"<3级","type":"晴","notice":"愿你拥有比阳光明媚的心情"},{"date":"25日星期日","sunrise":"06:13","high":"高温 22.0℃","low":"低温 7.0℃","sunset":"18:30","aqi":71,"fx":"西南风","fl":"<3级","type":"晴","notice":"愿你拥有比阳光明媚的心情"},{"date":"26日星期一","sunrise":"06:11","high":"高温 21.0℃","low":"低温 8.0℃","sunset":"18:31","aqi":97,"fx":"西南风","fl":"<3级","type":"多云","notice":"阴晴之间,谨防紫外线侵扰"}]}}

进行encodeURIComponent之后,内容为:

%7B%22date%22%3A%2220180322%22%2C%22message%22%3A%22Success%20!%22%2C%22status%22%3A200%2C%22city%22%3A%22%E5%8C%97%E4%BA%AC%22%2C%22count%22%3A632%2C%22data%22%3A%7B%22shidu%22%3A%2234%25%22%2C%22pm25%22%3A73%2C%22pm10%22%3A91%2C%22quality%22%3A%22%E8%89%AF%22%2C%22wendu%22%3A%225%22%2C%22ganmao%22%3A%22%E6%9E%81%E5%B0%91%E6%95%B0%E6%95%8F%E6%84%9F%E4%BA%BA%E7%BE%A4%E5%BA%94%E5%87%8F%E5%B0%91%E6%88%B7%E5%A4%96%E6%B4%BB%E5%8A%A8%22%2C%22yesterday%22%3A%7B%22date%22%3A%2221%E6%97%A5%E6%98%9F%E6%9C%9F%E4%B8%89%22%2C%22sunrise%22%3A%2206%3A19%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2011.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%201.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A26%22%2C%22aqi%22%3A85%2C%22fx%22%3A%22%E5%8D%97%E9%A3%8E%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E5%A4%9A%E4%BA%91%22%2C%22notice%22%3A%22%E9%98%B4%E6%99%B4%E4%B9%8B%E9%97%B4%EF%BC%8C%E8%B0%A8%E9%98%B2%E7%B4%AB%E5%A4%96%E7%BA%BF%E4%BE%B5%E6%89%B0%22%7D%2C%22forecast%22%3A%5B%7B%22date%22%3A%2222%E6%97%A5%E6%98%9F%E6%9C%9F%E5%9B%9B%22%2C%22sunrise%22%3A%2206%3A17%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2017.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%201.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A27%22%2C%22aqi%22%3A98%2C%22fx%22%3A%22%E8%A5%BF%E5%8D%97%E9%A3%8E%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E6%99%B4%22%2C%22notice%22%3A%22%E6%84%BF%E4%BD%A0%E6%8B%A5%E6%9C%89%E6%AF%94%E9%98%B3%E5%85%89%E6%98%8E%E5%AA%9A%E7%9A%84%E5%BF%83%E6%83%85%22%7D%2C%7B%22date%22%3A%2223%E6%97%A5%E6%98%9F%E6%9C%9F%E4%BA%94%22%2C%22sunrise%22%3A%2206%3A16%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2018.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%205.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A28%22%2C%22aqi%22%3A118%2C%22fx%22%3A%22%E6%97%A0%E6%8C%81%E7%BB%AD%E9%A3%8E%E5%90%91%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E5%A4%9A%E4%BA%91%22%2C%22notice%22%3A%22%E9%98%B4%E6%99%B4%E4%B9%8B%E9%97%B4%EF%BC%8C%E8%B0%A8%E9%98%B2%E7%B4%AB%E5%A4%96%E7%BA%BF%E4%BE%B5%E6%89%B0%22%7D%2C%7B%22date%22%3A%2224%E6%97%A5%E6%98%9F%E6%9C%9F%E5%85%AD%22%2C%22sunrise%22%3A%2206%3A14%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2021.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%207.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A29%22%2C%22aqi%22%3A52%2C%22fx%22%3A%22%E8%A5%BF%E5%8D%97%E9%A3%8E%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E6%99%B4%22%2C%22notice%22%3A%22%E6%84%BF%E4%BD%A0%E6%8B%A5%E6%9C%89%E6%AF%94%E9%98%B3%E5%85%89%E6%98%8E%E5%AA%9A%E7%9A%84%E5%BF%83%E6%83%85%22%7D%2C%7B%22date%22%3A%2225%E6%97%A5%E6%98%9F%E6%9C%9F%E6%97%A5%22%2C%22sunrise%22%3A%2206%3A13%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2022.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%207.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A30%22%2C%22aqi%22%3A71%2C%22fx%22%3A%22%E8%A5%BF%E5%8D%97%E9%A3%8E%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E6%99%B4%22%2C%22notice%22%3A%22%E6%84%BF%E4%BD%A0%E6%8B%A5%E6%9C%89%E6%AF%94%E9%98%B3%E5%85%89%E6%98%8E%E5%AA%9A%E7%9A%84%E5%BF%83%E6%83%85%22%7D%2C%7B%22date%22%3A%2226%E6%97%A5%E6%98%9F%E6%9C%9F%E4%B8%80%22%2C%22sunrise%22%3A%2206%3A11%22%2C%22high%22%3A%22%E9%AB%98%E6%B8%A9%2021.0%E2%84%83%22%2C%22low%22%3A%22%E4%BD%8E%E6%B8%A9%208.0%E2%84%83%22%2C%22sunset%22%3A%2218%3A31%22%2C%22aqi%22%3A97%2C%22fx%22%3A%22%E8%A5%BF%E5%8D%97%E9%A3%8E%22%2C%22fl%22%3A%22%3C3%E7%BA%A7%22%2C%22type%22%3A%22%E5%A4%9A%E4%BA%91%22%2C%22notice%22%3A%22%E9%98%B4%E6%99%B4%E4%B9%8B%E9%97%B4%EF%BC%8C%E8%B0%A8%E9%98%B2%E7%B4%AB%E5%A4%96%E7%BA%BF%E4%BE%B5%E6%89%B0%22%7D%5D%7D%7D

于是,这坨看起来乱七八糟的字符串,就可以拼接到https://www.baidufe.com/fehelper/jsonformat.html#json= 后面了!格式化后:

屏幕快照 2018-03-23 下午5.04.09.png

Enjoy!

趣店(原趣分期)技术学院
重点关注技术架构、服务化、优秀工具、自动化平台、开发全流程一体化解决方案、新人培养、工程师进阶之道等方面
这里环境优雅、氛围年轻、主要是福利还多,还等什么?我们敞开技术的大门,欢迎各种工程师加入!

评论区域

line