| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <!DOCTYPE HTML>
- <html lang="zh-CN">
- <head>
- <title>Json格式化查看工具</title>
- <meta charset="UTF-8">
- <link rel="stylesheet" href="../static/css/fe-jsonformat.css" />
- <script type="text/javascript" src="../static/js/core/jquery-1.5.min.js"></script>
- <script type="text/javascript" src="../static/js/mod/mod_jsonformat.js"></script>
- </head>
- <body>
- <div class="wrapper wp-json">
- <div class="panel panel-default" style="margin-bottom: 0px;">
- <div class="panel-heading">
- <h3 class="panel-title">
- <a href="http://www.baidufe.com/fehelper/feedback.html" target="_blank" class="x-a-high">
- <img src="../static/img/fe-16.png" alt="fehelper"/> FeHelper</a>:JSON格式化查看
- <span class="x-xdemo">示例1:JSON片段</span>
- <a class="x-xdemo" href="https://www.sojson.com/open/api/weather/json.shtml?city=%E5%8C%97%E4%BA%AC" target="_blank">示例2:在线JSON-1</a>
- <a class="x-xdemo" href="https://suggest.taobao.com/sug?code=utf-8&q=iphonex&callback=thisIsACallbackFunction" target="_blank">示例3:在线JSON-2</a></h3>
- <textarea name="demo" id="demo" cols="30" rows="10" class="hide">
- {
- "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": "阴晴之间,谨防紫外线侵扰"
- }
- ]
- }
- }</textarea>
- </div>
- </div>
- <div class="panel-body mod-json">
- <div class="row panel-txt">
- <textarea class="form-control mod-textarea" id="jsonSource" placeholder="在这里粘贴您需要进行格式化的JSON代码"></textarea>
- <div><button id="btnFormat" class="btn btn-primary ui-mt-10">格式化</button><span id="errorMsg"></span></div>
- </div>
- <div class="row rst-item" id="modJsonResult">
- <div id="formattingMsg">
- <svg id="spinner" width="16" height="16" viewBox="0 0 300 300" xmlns="http://www.w3.org/2000/svg" version="1.1">
- <path d="M 150,0 a 150,150 0 0,1 106.066,256.066 l -35.355,-35.355 a -100,-100 0 0,0 -70.711,-170.711 z" fill="#3d7fe6"></path>
- </svg>
- 加载中...
- </div>
- <div id="jfCallbackName_start" class="callback-name"></div>
- <div id="jfContent">
- <div class="x-placeholder">
- <img src="../static/img/json-demo.jpg" alt="json-placeholder">
- </div>
- </div>
- <pre id="jfContent_pre"></pre>
- <div id="jfCallbackName_end" class="callback-name"></div>
- </div>
- </div>
- </div>
- </body>
- </html>
|