javascript – 是否有一个简单的库将JSON对象渲染为树?

栏目: 后端 · 前端 · 发布时间: 7年前

内容简介:检查一下:翻译自:https://stackoverflow.com/questions/641218/is-there-a-simple-library-that-will-render-json-objects-as-trees

那么,是否有一个非常简单的库将JSON对象渲染为树?

我知道这可以通过多种方式完成(例如YUI),但出于调试目的,我希望能够简单地查看从服务器接收的JSON对象作为树,没什么花哨的(但可折叠的树会是奖金).

我正在寻找的解决方案类似于:

<script source="something.js"/>
<script>
   obj ={"hello":"world"}
   lib.renderJSON("someid",obj);
</script>
...    
<div id="someid"/>

有任何想法吗?

检查一下: http://jquery.bassistance.de/treeview/demo/async.html

翻译自:https://stackoverflow.com/questions/641218/is-there-a-simple-library-that-will-render-json-objects-as-trees


以上所述就是小编给大家介绍的《javascript – 是否有一个简单的库将JSON对象渲染为树?》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

APIs

APIs

Daniel Jacobson、Greg Brail、Dan Woods / O'Reilly Media / 2011-12-24 / USD 24.99

Many of the highest traffic sites get more than half of their traffic not through the browser but through the APIs they have created. Salesforce.com (more than 50%) and Twitter (more than 75% fall int......一起来看看 《APIs》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具