是否有方法在服务器端或客户端处理json响应?

我必须向Pipl.com提出请求以获取一些信息( http://apis.pipl.com//search/v2/json/?email=maryuca_alias%40yahoo.com&person_mode=all&exact_name=0&no_sponsored=0&key=myKey)。这个请求的响应是一个json对象,我无法使用Ajax/jQuery/JSONP调用来实现这一点,因为他们的服务器不支持这种类型的调用。是否有方法在服务器端(我使用Struts 1)或客户端处理响应?如果你有解决办法,请回答这个问题。

<html>
<head>
</head>
<body>
<script type="text/javascript">
function getJSONP(url, success) {
var ud = '_' + +new Date,
script = document.createElement('script'),
head = document.getElementsByTagName('head')[0] 
|| document.documentElement;
window[ud] = function(data) {
head.removeChild(script);
alert(data);
success && success(data);
};
script.src = url.replace('callback=?', 'callback=' + ud);
head.appendChild(script);
}
getJSONP('http://apis.pipl.com//search/v2/json/?email=maryuca_alias
%40yahoo.com&person_mode=all&exact_name=0&no_sponsored=0
&key=key&callback=?', function(data){
console.log(data);
});     
</script>
</body>
</html>

ok, it looks like u make a valid cross site request, but u get header different than expected or data not JSON formated?

if its just headers of response are not proper u can always parse data on client side. best way to specify problems would be pasting headers of request, response and code

Use something like HttpClient to make the request from Java, probably in a service called by the action class. That response can be processed by either Java or JavaScript, depending on your needs.