Small ajax handler to get JSON responses.