如何查看/处理JSON文件? [英] How can I view/manipulate a JSON file?

查看:632
本文介绍了如何查看/处理JSON文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个项目,一位研究合作伙伴从他的网站为我提供了海量数据,我需要对其进行分析.我曾尝试将文件导入excel,但是这很尴尬,并且想出一种有效的方法来描绘数据已被证明几乎是不可能的.是否有任何程序或技术来获取JSON文件并将数据组织成类似于电子表格的内容? (最终,我需要对数据进行采样,但仅对几个变量进行数据分析.我需要将其转换为某种电子表格类型的格式,或者以某种视觉上(如果不是从功能上来说)类似的格式进行显示.找出我在相关类别中有多少个数据点并随机抽样)

谢谢您的帮助!

I''m working on a research project and a research partner has provided me with a massive file of data from his website, which I need to be able to analyze. I''ve tried importing the file into excel, but it''s awkward and figuring out an effective way to delineate the data has proven nearly impossible. Is there any program or technique to take the JSON file and organize the data into something resembling a spreadsheet? (Ultimately, I need to sample the data, but only for a couple variables, for my data analysis. I need to get it into some sort of spreadsheet-type format or something that is visually, if not functionally, similar that would allow me to figure out how many datapoints I have in the relevant categories and to randomly sample them)

Thanks for any help!

推荐答案

JSON的确是结构合理且定界的,尽管可能不好看.

您很快就会遇到问题,即数据不是平坦的",因此不能放在一行中.这是因为JSON数据可以包含具有不同深度级别的丰富对象.

我认为您有两门不错的课程可供学习:
1)要求再次导出结构化平面数据,并且仅包含您需要分析的数据.
2)编写一些jQuery(并使用JSON附加库)来加载文件并遍历数据,然后将其发布到简单的数据库中.然后,您可以根据需要导出数据(或进行在线分析).

同样,问题不是(或不应该)您正在使用JSON,只是JSON和Excel是不同的范例.

干杯.
JSON is indeed structured and well delimited, though perhaps not good pretty to read.

You''ll run into the problem fairly quickly that the data is not ''flat'' and therefore can''t be put on a single row. This is because JSON data can contain rich objects to varying levels of depth.

I think you have two good courses to pursue:
1) Ask for another export of the data, structured flat and with only the data you need to analyze.
2) Write a little bit of jQuery (and use the JSON add-on library) to load the file up and foreach through the data, posting it to s simple database. You could then export the data as you need (or analyze it in-line).

Again, the problem isn''t (or shouldn''t be) that you''re working with JSON, it''s just that JSON and Excel are different paradigms.

Cheers.


这篇关于如何查看/处理JSON文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆