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.