是否有任何可公开访问的 JSON 数据源来测试真实世界的数据? [英] Is there any publicly accessible JSON data source to test with real world data?

查看:25
本文介绍了是否有任何可公开访问的 JSON 数据源来测试真实世界的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 JavaScript 动态加载的树视图用户控件.我想用真实世界的数据对其进行测试.

有没有人知道任何具有 API 的公共服务,该 API 提供对 JSON 格式的分层数据的访问?

解决方案

Twitter 有一个公共 API 返回 JSON,例如 -

GET 请求:

https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=mralexgray&count=1,

由于 Twitter 使用 OAUTH 要求限制他们的 API 而被删除...

{"errors": [{"message": "Twitter REST API v1 不再处于活动状态.请迁移到 API v1.1.https://dev.twitter.com/docs/api/1.1/概述.",代码":68}]}

用一个简单的 Github API 示例替换它 - 返回一棵树,在这个案例,我的存储库...

<块引用>

https://api.github.com/users/mralexgray/repos

我不会包括输出,因为它很长......(一次返回 30 个存储库)......但这里证明了它是树状的.

I'm working on a JavaScript dynamically loaded tree view user control. I'd like to test it with real world data.

Does anybody know any public service with an API that provides access to hierarchical data in JSON format?

解决方案

Twitter has a public API which returns JSON, for example -

A GET request to:

https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=mralexgray&count=1,

EDIT: Removed due to twitter restricting their API with OAUTH requirements...

{"errors": [{"message": "The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.", "code": 68}]}

Replacing it with a simple example of the Github API - that returns a tree, of in this case, my repositories...

https://api.github.com/users/mralexgray/repos

I won't include the output, as it's long.. (returns 30 repos at a time) ... But here is proof of it's tree-ed-ness.

这篇关于是否有任何可公开访问的 JSON 数据源来测试真实世界的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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