Javaを使用して残りのWebサービスを作成し、WebサイトのAPIを呼び出してからjsonを返す例を誰でも提供できますか?
たとえば、次の URL の Google マップ API:
私に与えます:
{
"debug_info" : [],
"html_attributions" : [
"Listings by \u003ca href=\"http://www.yellowpages.com.au/\"\u003eYellow Pages\u003c/a\u003e"
],
"next_page_token" : "CkQ2AAAAofX2E2QEjupf8_2fHdU2VWhd_m1UHQbfLZYt_Afh_pKBsboFKnChqjNnRAhabuNLATuCLqhDo43LaMpXFxDdGRIQFawAdzfVPVeUaD6p_vjjexoULA5HagnDRfChHbWdjDUkQYTTAsk",
"results" : [
{
"formatted_address" : "2 Henry Lawson Avenue, McMahons Point NSW, Australia",
"geometry" : {
"location" : {
"lat" : -33.848536,
"lng" : 151.20613
}
},
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
"id" : "518a9a070a33fb6e1ec75a076782515c688fd855",
"name" : "Sails on Lavender Bay",
"opening_hours" : {
"open_now" : false
},
"photos" : [
{
"height" : 236,
"html_attributions" : [],
"photo_reference" : "CoQBfAAAABLadap32Q-C2R5MUp4RFdxYN5wIRzp1li8zyS_oqM0DZyjW5MJ5D5mzdSg_fUNrlnRpvZ2gYXSb8wGluXESztdKONUm4fqavwU7BdugbEYxyRqJmFkWnhNmEyNdj0WKHIYo4ViHWRUhnd3YgALSPBlnJBBTsBy8si9-5penG0LtEhBXI4Ijyq92xl762MwkDOCiGhQWEz49n1-5XplaLJ-PmuH8AeqpKQ",
"width" : 371
}
],
"price_level" : 3,
"rating" : 4.3,
"reference" : "CoQBcwAAALMXTtQBHqX59XmtlsoyzeZRtxcmU7Tv9Dw70xypZNb10RcbsJH9ejaqx5I5HouifcbkaR60V7Xr4X1nmot9JJQW1IG2CHUXvGQCaLKPe2jHBLnwKuc79HmhE6qLl9Koh4xWzKtOqycGSTbU9-qeXqehGcRK2tlbY-DWaCnILqTeEhBGY3xdW3wFdQPD5VVEE3VYGhRYylVumuS7t3wmqJVkbplqW9pLJg",
"types" : [ "restaurant", "food", "establishment" ]
残りの Web サービスは、パラメーターを変更するオプションを使用して URL を取得し、JSON の結果を返す必要があります。