JavaScript 数据结构可视化工具

发布于 2024-09-29 06:04:00 字数 484 浏览 7 评论 0原文

我正在寻找一个 javascript 库,它将任意(但非循环)JSON 数据 blob 呈现为某种半交互式 HTML 视图。 James Padolsey 的 Prettyprint 库很接近,但它的输出非常冗长(“object例如,所有内容上的“和”数组”标头)只是少量交互(折叠和展开子树的能力会很好,尤其是)并且不是特别可定制的。我还找到了 jstree,但它看起来并不能处理任意 JSON 数据blob,只有专门构建的才能喂给它。另外,严格的树视图并不适合我所拥有的数据;我想要更多的键/值表示(但有些值是嵌套对象)。

我不需要修改数据结构的能力,只需以或多或少人类可读的方式显示它即可。

有什么建议吗?

I am looking for a javascript library which renders an arbitrary (but acyclic) JSON data blob into some sort of semi-interactive HTML view. James Padolsey's Prettyprint library comes close, but its output is very verbose ("object" and "array" headers on everything, for instance), is only marginally interactive (the ability to collapse and expand subtrees would be nice, especially) and not particularly customizable. I also found jstree, but it looks like that doesn't do arbitrary JSON data blobs, only ones specifically constructed to be fed to it. Also, a strict treeview is not really right for the data I have; I want more of a key/value presentation (but with some values being nested objects).

I do not need the ability to modify the data structure, just show it in a more-or-less human readable fashion.

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

樱花坊 2024-10-06 06:04:00

我有一个小项目来显示 jsobjects。

它不是很漂亮,可以进行一些改进,但可能会有所帮助。

它基于“jquery-1.4.2.min.js”构建,但应该适用于旧版本。

文件:
http://empirium.dnet.nu/js/object-browser.js
http://empirium.dnet.nu/js/object-browser.css

这是如何使用它的示例:

http://empirium.dnet.nu/OBTest.html

单击粗体黑色类型将打开和关闭不立即可见的复杂数据结构。

我希望你对它有一些用处,如果你有任何建议,请在这里评论。

它不是一个活跃的项目,只是我为了进行一些调试而编写的东西。

I have a small project to display jsobjects.

Its not very pretty and could use some improvements but it might help out a little.

It is built on "jquery-1.4.2.min.js" but should work with older versions.

Files:
http://empirium.dnet.nu/js/object-browser.js
http://empirium.dnet.nu/js/object-browser.css

This is an example on how to use it:

http://empirium.dnet.nu/OBTest.html

Clicking on the bold black type will open and close complex datastructures that are not visible imediatly.

I hope you have some use for it and if you have any suggestions please just comment here.

Its not an active project, just something I wrote to do some debugging.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文