有谁知道一个演示JSON服务器?

时间:2013-03-30 10:46:52

标签: json testing demo

我正在构建一个库,该库调用返回JSON的服务器。我希望能够测试这个库。这将需要我的测试代码调用返回JSON的工作服务器。有谁知道适合此目的的服务器?

2 个答案:

答案 0 :(得分:27)

位于http://echo.jsontest.com的优质服务器正是这样做的。您甚至可以通过更改您调用的URI来确定输出。

例如,http://echo.jsontest.com/key/value URI返回:

{"key": "value"}

http://echo.jsontest.com/key/value/otherkey/othervalue URI返回:

{
   "otherkey": "othervalue",
   "key": "value"
}

服务器也非常快,非常适合测试目的。

答案 1 :(得分:0)

您可以使用facebook或twitter public api测试您的lib。 举个例子 : http://search.twitter.com/search.json?q=blue%20angels将返回一个json对象。

Doc在这里:https://dev.twitter.com/docs/api/1/get/search

相关问题