Does anyone know a demo JSON server?

Erik Schierboom picture Erik Schierboom · Mar 30, 2013 · Viewed 19.1k times · Source

I am building a library that makes calls to a server that returns JSON. I'd like to be able to test this library. This would require my testing code to make a call to a working server that returns JSON. Does anyone know of a server that is suitable for this purpose?

Answer

Erik Schierboom picture Erik Schierboom · Mar 30, 2013

There is a great server located at http://echo.jsontest.com that does precisely this. You can even determine the output by changing the URI you call.

For example, the http://echo.jsontest.com/key/value URI returns this:

{"key": "value"}

And the http://echo.jsontest.com/key/value/otherkey/othervalue URI returns:

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

The server is also very fast, ideal for testing purposes.