json-view
Posted 教父123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json-view相关的知识,希望对你有一定的参考价值。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>JQuery JSONView</title> <link rel="stylesheet" href="jquery.jsonview.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script type="text/javascript" src="jquery.jsonview.js"></script> <script type="text/javascript"> var json = { "hey": "guy", "anumber": 243, "anobject": { "whoa": "nuts", "anarray": [1, 2, "thr<h1>ee"], "more": "stuff" }, "awesome": true, "bogus": false, "meaning": null, "japanese": "永远的明天。", "link": "http://jsonview.com", "notLink": "http://jsonview.com是很棒的", "multiline": [ ‘像我一样,你可以向前走,‘, ‘走下坡路走.‘, ‘嗯,我也把我放下了.‘, ‘路人,请停在这里.‘ ].join("\n") }; var allJson = { "id": 61891, "subLemmaId": 14022133, "newLemmaId": 1122445, "key": "中国", "desc": "世界四大文明古国之一", "title": "中国", "card": [ { "key": "m7_nameC", "name": "中文名称", "value": [ "中国" ], "format": [ "中国" ] }, { "key": "m7_nameE", "name": "英文名称", "value": [ "China" ], "format": [ "China" ] }, { "key": "m7_nameOther", "name": "简称", "value": [ "华、夏" ], "format": [ "华、夏" ] }, { "key": "m7_continent", "name": "所属洲", "value": [ "亚洲" ], "format": [ "亚洲" ] }, { "key": "m7_country1", "name": "首都", "value": [ "<a target=_blank href=\"/item/%E9%95%BF%E5%AE%89/31540\" data-lemmaid=\"31540\">长安</a>、<a target=_blank href=\"/item/%E6%B4%9B%E9%98%B3/125712\" data-lemmaid=\"125712\">洛阳</a>、<a target=_blank href=\"/item/%E5%8D%97%E4%BA%AC/23952\" data-lemmaid=\"23952\">南京</a>、<a target=_blank href=\"/item/%E5%8C%97%E4%BA%AC/128981\" data-lemmaid=\"128981\">北京</a>等" ], "format": [ "<a target=_blank href=\"/item/%E9%95%BF%E5%AE%89/31540\" data-lemmaid=\"31540\">长安</a>、<a target=_blank href=\"/item/%E6%B4%9B%E9%98%B3/125712\" data-lemmaid=\"125712\">洛阳</a>、<a target=_blank href=\"/item/%E5%8D%97%E4%BA%AC/23952\" data-lemmaid=\"23952\">南京</a>、<a target=_blank href=\"/item/%E5%8C%97%E4%BA%AC/128981\" data-lemmaid=\"128981\">北京</a>等" ] }, { "key": "m7_country6", "name": "官方语言", "value": [ "<a target=_blank href=\"/item/%E6%B1%89%E8%AF%AD\">汉语</a>" ], "format": [ "<a target=_blank href=\"/item/%E6%B1%89%E8%AF%AD\">汉语</a>" ] }, { "key": "m7_country12", "name": "主要民族", "value": [ "<a target=_blank href=\"/item/%E6%B1%89%E6%97%8F\">汉族</a>" ], "format": [ "<a target=_blank href=\"/item/%E6