唱衰 Java 的声音由来已久。

尤其是近几年,云原生时代的到来,软件的交付方式发生了根本性变化,Java 遭受了诸多质疑。

传统领域的 Java 开发,交付的是 Java 应用本身,具体体现在以 “jar”“war” 的形式交付,而云原生最佳实践,则是基于微服务形式,以容器为基本交付单位,并在 K8S 中编排。云原生应用要求更快速的启动、强调资源按量消费,弹性扩展,以及可观测性等。就这一层面而言,在云原生时代,Java 的缺陷确实是天然存在的。

“事实上,Java 技术在云原生时代也在不停地进化。” 面对唱衰 Java 的诸多论调,阿里云程序语言与编译器团队负责人、Java Champion 李三红选择理性看待。

但其实小编觉得并不然,Java最初被设计用来编写桌面应用程序,但是现在它被广泛用于各种开发领域。它也用于网络应用程序、数据库、 Web应用程序和桌面游戏。Java还可以与多种硬件平台兼容,并且能够在不同的操作系统上运行。Java代码的特点是简单、高效和可靠,可以说 Java是一种“万能”编程语言,而且它还在不断发展变化。

接下来我会展示Java获取京东JD商品详情操作示例:

Java请求示例

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import java.nio.charset.Charset;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.PrintWriter;
import java.net.URLConnection;

public class Example {
	private static String readAll(Reader rd) throws IOException {
		StringBuilder sb = new StringBuilder();
		int cp;
		while ((cp = rd.read()) != -1) {
			sb.append((char) cp);
		}
		return  sb.toString();
	}
	public static JSONObject postRequestFromUrl(String url, String body) throws IOException, JSONException {
		URL realUrl = new URL(url);
		URLConnection conn = realUrl.openConnection();
		conn.setDoOutput(true);
		conn.setDoInput(true);
		PrintWriter out = new PrintWriter(conn.getOutputStream());
		out.print(body);
		out.flush();
		InputStream instream = conn.getInputStream();
		try {
			BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8")));
			String jsonText = readAll(rd);
			JSONObject json = new JSONObject(jsonText);
			return json;
		} finally {
			instream.close();
		}
	}
	public static JSONObject getRequestFromUrl(String url) throws IOException, JSONException {
		URL realUrl = new URL(url);
		URLConnection conn = realUrl.openConnection();
		InputStream instream = conn.getInputStream();
		try {
			BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8")));
			String jsonText = readAll(rd);
			JSONObject json = new JSONObject(jsonText);
			return json;
		} finally {
			instream.close();
		}
	}
	public static void main(String[] args) throws IOException, JSONException {
		// 请求示例 url 默认请求参数已经URL编码处理
		String url = "https://=v;18870288846/jd/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=10335871600";
		JSONObject json = getRequestFromUrl(url);
		System.out.println(json.toString());
	}

}

响应示例

{
	"item": {
		"num_iid": "10335871600",
		"title": "安踏男鞋休闲运动鞋男士2021春季网面透气轻便板鞋慢跑步鞋子户外训练旅游 -6安踏白 42",
		"desc_short": "",
		"price": "159.00",
		"total_price": 0,
		"suggestive_price": 0,
		"orginal_price": "249.00",
		"nick": "安踏悠购专卖店",
		"num": 999,
		"min_num": 0,
		"detail_url": "https://item.jd.com/10335871600.html",
		"pic_url": "//img10.360buyimg.com/n1/jfs/t1/161425/26/11624/223402/6048750bE7b82f057/24b57f419c846302.jpg",
		"brand": "",
		"brandId": "",
		"rootCatId": 12099,
		"cid": 9756,
		"crumbs": [],
		"created_time": "",
		"modified_time": "",
		"delist_time": "",
		"desc": "<p><br></p><p><img src=\"https://img10.360buyimg.com/imgzone/jfs/t1/38380/20/8577/216030/5cfdcf2eE3d3c15fc/9072ee4986b3f8d4.jpg\"><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t11302/317/3187030400/282664/5886b268/5ce3c383N6572b1da.jpg\"><br></p><p><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t29380/248/1583857170/211757/8803264c/5ce3c383Nf658d385.jpg\"><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/109234/40/8433/163092/5e6764a2E4e1a8595/47322c3588d6d0c8.jpg\"><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/89006/11/14706/167699/5e6764a2E68bdab3a/be235af214561ca7.jpg\"><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/109389/11/8312/121412/5e6764a2E0699edcb/74e48d00298808af.jpg\"><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/93399/24/14627/132014/5e6764a3E0f078e8e/8598eb9176d64a6c.jpg\"><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/107443/10/8345/114390/5e6764a3Ea1726cee/45cfa1a0f7a8df0c.jpg\"></p><p><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/96343/40/10991/241473/5e257548Ed6f96ea3/b52ab120eb9f7db0.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/101185/7/11047/209310/5e257548E8788bdf6/c20d5eb0405dde28.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/107815/5/4768/276947/5e257548Ee42f500c/0ba8cd264bd603a3.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/95922/19/10937/254828/5e257549Eaad6ebf6/7d1400f5908cb55e.jpg\" ></p><p><img src=\"https://img30.360buyimg.com/popWaterMark/jfs/t1/18297/2/6243/210375/5c5019eeE98403891/9b5ab2294d1ba205.jpg\"><br></p><p><img src=\"https://img30.360buyimg.com/popWaterMark/jfs/t1/27804/18/6412/176509/5c5019eeE5e96f053/a189a00b486e911f.jpg\"><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/96858/36/10825/132522/5e2575aaE6e19013f/fcb7fb8fd4943401.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/99976/27/10982/138934/5e2575afEc3a3592a/e17eb9f780781060.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/96877/26/10975/138715/5e25756dE20b8140b/19ae8dc80c60e881.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/98449/30/11083/55082/5e25756dE88f3074f/7616bc2265b4432c.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/95543/21/10832/67134/5e25756eE012754e2/70f82adbaa11adee.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/94888/33/11004/95067/5e25756eE02e81061/61480afaef4c3b86.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/108065/10/4797/103705/5e25756eEebecd8f5/65e124bd694bc55b.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/85920/26/11004/124810/5e25756eEa5644682/8fbaea1d59e5be77.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/84849/11/11057/55611/5e25756eE9f2527d0/83d5811a3712f5fd.jpg\" ><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/90594/7/11010/137361/5e25756eE5d4d543c/61e96678694e5ba5.jpg\"  class=\"\"><img src=\"http://img30.360buyimg.com/popWaterMark/jfs/t1/85156/23/10917/211412/5e2546caEbf42fae5/5e494f3c805915e6.jpg\" ></p><p><br></p><br/>",
		"desc_img": [
			"https://img10.360buyimg.com/imgzone/jfs/t1/38380/20/8577/216030/5cfdcf2eE3d3c15fc/9072ee4986b3f8d4.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t11302/317/3187030400/282664/5886b268/5ce3c383N6572b1da.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t29380/248/1583857170/211757/8803264c/5ce3c383Nf658d385.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/109234/40/8433/163092/5e6764a2E4e1a8595/47322c3588d6d0c8.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/89006/11/14706/167699/5e6764a2E68bdab3a/be235af214561ca7.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/109389/11/8312/121412/5e6764a2E0699edcb/74e48d00298808af.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/93399/24/14627/132014/5e6764a3E0f078e8e/8598eb9176d64a6c.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/107443/10/8345/114390/5e6764a3Ea1726cee/45cfa1a0f7a8df0c.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/96343/40/10991/241473/5e257548Ed6f96ea3/b52ab120eb9f7db0.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/101185/7/11047/209310/5e257548E8788bdf6/c20d5eb0405dde28.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/107815/5/4768/276947/5e257548Ee42f500c/0ba8cd264bd603a3.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/95922/19/10937/254828/5e257549Eaad6ebf6/7d1400f5908cb55e.jpg",
			"https://img30.360buyimg.com/popWaterMark/jfs/t1/18297/2/6243/210375/5c5019eeE98403891/9b5ab2294d1ba205.jpg",
			"https://img30.360buyimg.com/popWaterMark/jfs/t1/27804/18/6412/176509/5c5019eeE5e96f053/a189a00b486e911f.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/96858/36/10825/132522/5e2575aaE6e19013f/fcb7fb8fd4943401.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/99976/27/10982/138934/5e2575afEc3a3592a/e17eb9f780781060.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/96877/26/10975/138715/5e25756dE20b8140b/19ae8dc80c60e881.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/98449/30/11083/55082/5e25756dE88f3074f/7616bc2265b4432c.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/95543/21/10832/67134/5e25756eE012754e2/70f82adbaa11adee.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/94888/33/11004/95067/5e25756eE02e81061/61480afaef4c3b86.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/108065/10/4797/103705/5e25756eEebecd8f5/65e124bd694bc55b.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/85920/26/11004/124810/5e25756eEa5644682/8fbaea1d59e5be77.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/84849/11/11057/55611/5e25756eE9f2527d0/83d5811a3712f5fd.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/90594/7/11010/137361/5e25756eE5d4d543c/61e96678694e5ba5.jpg",
			"http://img30.360buyimg.com/popWaterMark/jfs/t1/85156/23/10917/211412/5e2546caEbf42fae5/5e494f3c805915e6.jpg"
		],
		"item_imgs": [
			{
				"url": "//img10.360buyimg.com/n1/jfs/t1/161425/26/11624/223402/6048750bE7b82f057/24b57f419c846302.jpg"
			},
			{
				"url": "//img10.360buyimg.com/n1/jfs/t1/37130/8/15667/153389/6011201bEb50bd760/f2d1ffe7ebad9436.jpg"
			},
			{
				"url": "//img10.360buyimg.com/n1/jfs/t1/164674/37/4551/170984/6011201bE0e613da2/440557c2c95a91d4.jpg"
			},
			{
				"url": "//img10.360buyimg.com/n1/jfs/t1/154416/30/16507/145178/6011201bEfa34047a/4bf1640b33cf9315.jpg"
			},
			{
				"url": "//img10.360buyimg.com/n1/jfs/t1/153609/29/16131/158270/6011201dEf430dc42/44d9310a57b910db.jpg"
			},
			{
				"url": "//img10.360buyimg.com/n1/jfs/t1/170321/31/4510/73278/6011201dEb0a321ee/4ab66e6bd5d24731.jpg"
			},
			{
				"url": "//img10.360buyimg.com/n1/jfs/t1/160893/36/4563/34735/6011201cEbc4782b3/421e58e83e287d8d.jpg"
			},
			{
				"url": "//img10.360buyimg.com/n1/jfs/t1/155392/21/16258/78051/6011201dEdbefbd4e/eb0bf02a39124ec5.jpg"
			},
			{
				"url": "//img10.360buyimg.com/n1/jfs/t1/85750/15/5753/82208/5def45a5E8bfae67b/5d6983c1a9b2dc81.jpg"
			}
		],
		"item_weight": "",
		"item_size": "",
		"location": "福建泉州市",
		"post_fee": "",
		"express_fee": "",
		"ems_fee": "",
		"shipping_to": "",
		"has_discount": "",
		"video": [],
		"is_virtual": "",
		"sample_id": "",
		"is_promotion": "",
		"props_name": "0:0:尺码:43;0:1:尺码:42;0:2:尺码:39;0:3:尺码:40;0:4:尺码:44.5;0:5:尺码:40.5;0:6:尺码:41;0:7:尺码:42.5;1:0:颜色:-19黑;1:1:颜色:-6安踏白;1:2:颜色:-1黑/大红/安踏白;1:3:颜色:-5黑【推荐】;1:4:颜色:-3黑/安踏白;1:5:颜色:-4二度灰/亚麻灰/安踏白;1:6:颜色:-18黑【皮面】",
		"prop_imgs": {
			"prop_img": [
				{
					"properties": "1:0",
					"url": "//img14.360buyimg.com/n1/jfs/t1/167443/5/11561/189395/60487513E67e1ac89/6f2b0e24a15d2a07.jpg"
				},
				{
					"properties": "1:1",
					"url": "//img10.360buyimg.com/n1/jfs/t1/161425/26/11624/223402/6048750bE7b82f057/24b57f419c846302.jpg"
				},
				{
					"properties": "1:2",
					"url": "//img13.360buyimg.com/n1/jfs/t1/170137/21/11570/221223/6048750eE6f37af3b/485bda2785ac1eeb.jpg"
				},
				{
					"properties": "1:3",
					"url": "//img12.360buyimg.com/n1/jfs/t1/166580/14/11814/282234/60487510E28b9a6a6/7276dcf61be1c212.jpg"
				},
				{
					"properties": "1:4",
					"url": "//img10.360buyimg.com/n1/jfs/t1/166198/6/11018/211129/6048750eEe91f12ae/fc70a6a6c9119278.jpg"
				},
				{
					"properties": "1:5",
					"url": "//img13.360buyimg.com/n1/jfs/t1/159863/10/12700/269705/60487512Ed2c190a7/d3e41f7e3f809632.jpg"
				},
				{
					"properties": "1:6",
					"url": "//img14.360buyimg.com/n1/jfs/t1/170113/38/11563/205655/6048750cEa69d1123/61dfb5929923dd6f.jpg"
				}
			]
		},
		"property_alias": "0:0:43;0:1:42;0:2:39;0:3:40;0:4:44.5;0:5:40.5;0:6:41;0:7:42.5;1:0:-19黑;1:1:-6安踏白;1:2:-1黑/大红/安踏白;1:3:-5黑【推荐】;1:4:-3黑/安踏白;1:5:-4二度灰/亚麻灰/安踏白;1:6:-18黑【皮面】",
		"props": [
			{
				"name": "商品名称",
				"value": "安踏男鞋休闲运动鞋男士2021春季网面透气轻便板鞋慢跑步鞋子户外训练旅游 -6安踏白 42"
			},
			{
				"name": "商品编号",
				"value": "10335871600"
			},
			{
				"name": "店铺",
				"value": "安踏悠购专卖店"
			},
			{
				"name": "商品毛重",
				"value": "400.00g"
			},
			{
				"name": "商品产地",
				"value": "中国大陆"
			},
			{
				"name": "货号",
				"value": "安踏1"
			},
			{
				"name": "鞋面材质",
				"value": "网布"
			},
			{
				"name": "类别",
				"value": "稳定跑鞋,缓冲跑鞋,马拉松跑鞋"
			},
			{
				"name": "运动鞋科技",
				"value": "扭转系统,易弯折功能,强化避震缓冲,透气技术,其它"
			},
			{
				"name": "适用季节",
				"value": "春季"
			},
			{
				"name": "上市时间",
				"value": "2021年春季"
			},
			{
				"name": "选购热点",
				"value": "透气,避震缓冲,经典款"
			},
			{
				"name": "适用人群",
				"value": "男士"
			},
			{
				"name": "鞋底材质",
				"value": "EVA"
			},
			{
				"name": "适合路面",
				"value": "跑道,公路,小道"
			},
			{
				"name": "运动系列",
				"value": "运动生活系列"
			},
			{
				"name": "功能",
				"value": "透气,耐磨,轻便"
			},
			{
				"name": "闭合方式",
				"value": "系带"
			},
			{
				"name": "颜色",
				"value": "白色,红色,灰色,黑色"
			}
		],
		"total_sold": "",
		"skus": {
			"sku": [
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:0;1:0",
					"properties_name": "0:0:尺码:43;1:0:颜色:-19黑",
					"quantity": 99,
					"sku_id": 10335871595,
					"sku_url": "http://item.jd.com/10335871595.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:1;1:0",
					"properties_name": "0:1:尺码:42;1:0:颜色:-19黑",
					"quantity": 99,
					"sku_id": 10335871594,
					"sku_url": "http://item.jd.com/10335871594.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:2;1:0",
					"properties_name": "0:2:尺码:39;1:0:颜色:-19黑",
					"quantity": 99,
					"sku_id": 10335871593,
					"sku_url": "http://item.jd.com/10335871593.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:3;1:0",
					"properties_name": "0:3:尺码:40;1:0:颜色:-19黑",
					"quantity": 99,
					"sku_id": 10335871592,
					"sku_url": "http://item.jd.com/10335871592.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:4;1:0",
					"properties_name": "0:4:尺码:44.5;1:0:颜色:-19黑",
					"quantity": 99,
					"sku_id": 10335871596,
					"sku_url": "http://item.jd.com/10335871596.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:5;1:0",
					"properties_name": "0:5:尺码:40.5;1:0:颜色:-19黑",
					"quantity": 99,
					"sku_id": 11500318990,
					"sku_url": "http://item.jd.com/11500318990.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:6;1:0",
					"properties_name": "0:6:尺码:41;1:0:颜色:-19黑",
					"quantity": 99,
					"sku_id": 10335871591,
					"sku_url": "http://item.jd.com/10335871591.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:7;1:0",
					"properties_name": "0:7:尺码:42.5;1:0:颜色:-19黑",
					"quantity": 99,
					"sku_id": 11488668356,
					"sku_url": "http://item.jd.com/11488668356.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:0;1:1",
					"properties_name": "0:0:尺码:43;1:1:颜色:-6安踏白",
					"quantity": 99,
					"sku_id": 10335876501,
					"sku_url": "http://item.jd.com/10335876501.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:1;1:1",
					"properties_name": "0:1:尺码:42;1:1:颜色:-6安踏白",
					"quantity": 99,
					"sku_id": 10335871600,
					"sku_url": "http://item.jd.com/10335871600.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:2;1:1",
					"properties_name": "0:2:尺码:39;1:1:颜色:-6安踏白",
					"quantity": 99,
					"sku_id": 10335871599,
					"sku_url": "http://item.jd.com/10335871599.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:3;1:1",
					"properties_name": "0:3:尺码:40;1:1:颜色:-6安踏白",
					"quantity": 99,
					"sku_id": 10335871598,
					"sku_url": "http://item.jd.com/10335871598.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:4;1:1",
					"properties_name": "0:4:尺码:44.5;1:1:颜色:-6安踏白",
					"quantity": 99,
					"sku_id": 10335876502,
					"sku_url": "http://item.jd.com/10335876502.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:5;1:1",
					"properties_name": "0:5:尺码:40.5;1:1:颜色:-6安踏白",
					"quantity": 99,
					"sku_id": 11500318989,
					"sku_url": "http://item.jd.com/11500318989.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:6;1:1",
					"properties_name": "0:6:尺码:41;1:1:颜色:-6安踏白",
					"quantity": 99,
					"sku_id": 10335871597,
					"sku_url": "http://item.jd.com/10335871597.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:7;1:1",
					"properties_name": "0:7:尺码:42.5;1:1:颜色:-6安踏白",
					"quantity": 99,
					"sku_id": 11488668357,
					"sku_url": "http://item.jd.com/11488668357.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:0;1:2",
					"properties_name": "0:0:尺码:43;1:2:颜色:-1黑/大红/安踏白",
					"quantity": 99,
					"sku_id": 10335871589,
					"sku_url": "http://item.jd.com/10335871589.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:1;1:2",
					"properties_name": "0:1:尺码:42;1:2:颜色:-1黑/大红/安踏白",
					"quantity": 99,
					"sku_id": 10335871588,
					"sku_url": "http://item.jd.com/10335871588.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:2;1:2",
					"properties_name": "0:2:尺码:39;1:2:颜色:-1黑/大红/安踏白",
					"quantity": 99,
					"sku_id": 10335871587,
					"sku_url": "http://item.jd.com/10335871587.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:3;1:2",
					"properties_name": "0:3:尺码:40;1:2:颜色:-1黑/大红/安踏白",
					"quantity": 99,
					"sku_id": 10335871586,
					"sku_url": "http://item.jd.com/10335871586.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:4;1:2",
					"properties_name": "0:4:尺码:44.5;1:2:颜色:-1黑/大红/安踏白",
					"quantity": 99,
					"sku_id": 10335871590,
					"sku_url": "http://item.jd.com/10335871590.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:5;1:2",
					"properties_name": "0:5:尺码:40.5;1:2:颜色:-1黑/大红/安踏白",
					"quantity": 99,
					"sku_id": 11500318988,
					"sku_url": "http://item.jd.com/11500318988.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:6;1:2",
					"properties_name": "0:6:尺码:41;1:2:颜色:-1黑/大红/安踏白",
					"quantity": 99,
					"sku_id": 10335876503,
					"sku_url": "http://item.jd.com/10335876503.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:7;1:2",
					"properties_name": "0:7:尺码:42.5;1:2:颜色:-1黑/大红/安踏白",
					"quantity": 99,
					"sku_id": 11488668358,
					"sku_url": "http://item.jd.com/11488668358.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:0;1:3",
					"properties_name": "0:0:尺码:43;1:3:颜色:-5黑【推荐】",
					"quantity": 99,
					"sku_id": 43139143226,
					"sku_url": "http://item.jd.com/43139143226.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:1;1:3",
					"properties_name": "0:1:尺码:42;1:3:颜色:-5黑【推荐】",
					"quantity": 99,
					"sku_id": 43139143227,
					"sku_url": "http://item.jd.com/43139143227.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:2;1:3",
					"properties_name": "0:2:尺码:39;1:3:颜色:-5黑【推荐】",
					"quantity": 99,
					"sku_id": 43139143228,
					"sku_url": "http://item.jd.com/43139143228.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:3;1:3",
					"properties_name": "0:3:尺码:40;1:3:颜色:-5黑【推荐】",
					"quantity": 99,
					"sku_id": 43139143229,
					"sku_url": "http://item.jd.com/43139143229.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:4;1:3",
					"properties_name": "0:4:尺码:44.5;1:3:颜色:-5黑【推荐】",
					"quantity": 99,
					"sku_id": 43139143230,
					"sku_url": "http://item.jd.com/43139143230.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:5;1:3",
					"properties_name": "0:5:尺码:40.5;1:3:颜色:-5黑【推荐】",
					"quantity": 99,
					"sku_id": 43139143231,
					"sku_url": "http://item.jd.com/43139143231.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:6;1:3",
					"properties_name": "0:6:尺码:41;1:3:颜色:-5黑【推荐】",
					"quantity": 99,
					"sku_id": 43139143232,
					"sku_url": "http://item.jd.com/43139143232.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:7;1:3",
					"properties_name": "0:7:尺码:42.5;1:3:颜色:-5黑【推荐】",
					"quantity": 99,
					"sku_id": 43139143233,
					"sku_url": "http://item.jd.com/43139143233.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:0;1:4",
					"properties_name": "0:0:尺码:43;1:4:颜色:-3黑/安踏白",
					"quantity": 99,
					"sku_id": 43139143234,
					"sku_url": "http://item.jd.com/43139143234.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:1;1:4",
					"properties_name": "0:1:尺码:42;1:4:颜色:-3黑/安踏白",
					"quantity": 99,
					"sku_id": 43139143235,
					"sku_url": "http://item.jd.com/43139143235.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:2;1:4",
					"properties_name": "0:2:尺码:39;1:4:颜色:-3黑/安踏白",
					"quantity": 99,
					"sku_id": 43139143236,
					"sku_url": "http://item.jd.com/43139143236.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:3;1:4",
					"properties_name": "0:3:尺码:40;1:4:颜色:-3黑/安踏白",
					"quantity": 99,
					"sku_id": 43139143237,
					"sku_url": "http://item.jd.com/43139143237.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:4;1:4",
					"properties_name": "0:4:尺码:44.5;1:4:颜色:-3黑/安踏白",
					"quantity": 99,
					"sku_id": 43139143238,
					"sku_url": "http://item.jd.com/43139143238.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:5;1:4",
					"properties_name": "0:5:尺码:40.5;1:4:颜色:-3黑/安踏白",
					"quantity": 99,
					"sku_id": 43139143239,
					"sku_url": "http://item.jd.com/43139143239.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:6;1:4",
					"properties_name": "0:6:尺码:41;1:4:颜色:-3黑/安踏白",
					"quantity": 99,
					"sku_id": 43139143240,
					"sku_url": "http://item.jd.com/43139143240.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:7;1:4",
					"properties_name": "0:7:尺码:42.5;1:4:颜色:-3黑/安踏白",
					"quantity": 99,
					"sku_id": 43139143241,
					"sku_url": "http://item.jd.com/43139143241.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:0;1:5",
					"properties_name": "0:0:尺码:43;1:5:颜色:-4二度灰/亚麻灰/安踏白",
					"quantity": 99,
					"sku_id": 43139143242,
					"sku_url": "http://item.jd.com/43139143242.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:1;1:5",
					"properties_name": "0:1:尺码:42;1:5:颜色:-4二度灰/亚麻灰/安踏白",
					"quantity": 99,
					"sku_id": 43139143243,
					"sku_url": "http://item.jd.com/43139143243.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:2;1:5",
					"properties_name": "0:2:尺码:39;1:5:颜色:-4二度灰/亚麻灰/安踏白",
					"quantity": 99,
					"sku_id": 43139143244,
					"sku_url": "http://item.jd.com/43139143244.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:3;1:5",
					"properties_name": "0:3:尺码:40;1:5:颜色:-4二度灰/亚麻灰/安踏白",
					"quantity": 99,
					"sku_id": 43139143245,
					"sku_url": "http://item.jd.com/43139143245.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:4;1:5",
					"properties_name": "0:4:尺码:44.5;1:5:颜色:-4二度灰/亚麻灰/安踏白",
					"quantity": 99,
					"sku_id": 43139143246,
					"sku_url": "http://item.jd.com/43139143246.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:5;1:5",
					"properties_name": "0:5:尺码:40.5;1:5:颜色:-4二度灰/亚麻灰/安踏白",
					"quantity": 99,
					"sku_id": 43139143247,
					"sku_url": "http://item.jd.com/43139143247.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:6;1:5",
					"properties_name": "0:6:尺码:41;1:5:颜色:-4二度灰/亚麻灰/安踏白",
					"quantity": 99,
					"sku_id": 43139143248,
					"sku_url": "http://item.jd.com/43139143248.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:7;1:5",
					"properties_name": "0:7:尺码:42.5;1:5:颜色:-4二度灰/亚麻灰/安踏白",
					"quantity": 99,
					"sku_id": 43139143249,
					"sku_url": "http://item.jd.com/43139143249.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:0;1:6",
					"properties_name": "0:0:尺码:43;1:6:颜色:-18黑【皮面】",
					"quantity": 99,
					"sku_id": 17160622595,
					"sku_url": "http://item.jd.com/17160622595.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:1;1:6",
					"properties_name": "0:1:尺码:42;1:6:颜色:-18黑【皮面】",
					"quantity": 99,
					"sku_id": 17160622594,
					"sku_url": "http://item.jd.com/17160622594.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:2;1:6",
					"properties_name": "0:2:尺码:39;1:6:颜色:-18黑【皮面】",
					"quantity": 99,
					"sku_id": 17160622593,
					"sku_url": "http://item.jd.com/17160622593.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:3;1:6",
					"properties_name": "0:3:尺码:40;1:6:颜色:-18黑【皮面】",
					"quantity": 99,
					"sku_id": 17160622600,
					"sku_url": "http://item.jd.com/17160622600.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:4;1:6",
					"properties_name": "0:4:尺码:44.5;1:6:颜色:-18黑【皮面】",
					"quantity": 99,
					"sku_id": 17160622598,
					"sku_url": "http://item.jd.com/17160622598.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:5;1:6",
					"properties_name": "0:5:尺码:40.5;1:6:颜色:-18黑【皮面】",
					"quantity": 99,
					"sku_id": 17160622599,
					"sku_url": "http://item.jd.com/17160622599.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:6;1:6",
					"properties_name": "0:6:尺码:41;1:6:颜色:-18黑【皮面】",
					"quantity": 99,
					"sku_id": 17160622597,
					"sku_url": "http://item.jd.com/17160622597.html"
				},
				{
					"price": "159.00",
					"orginal_price": "249.00",
					"properties": "0:7;1:6",
					"properties_name": "0:7:尺码:42.5;1:6:颜色:-18黑【皮面】",
					"quantity": 99,
					"sku_id": 17160622596,
					"sku_url": "http://item.jd.com/17160622596.html"
				}
			]
		},
		"seller_id": "",
		"sales": "30万+",
		"shop_id": 221247,
		"props_list": {
			"0:0": "尺码:43",
			"0:1": "尺码:42",
			"0:2": "尺码:39",
			"0:3": "尺码:40",
			"0:4": "尺码:44.5",
			"0:5": "尺码:40.5",
			"0:6": "尺码:41",
			"0:7": "尺码:42.5",
			"1:0": "颜色:-19黑",
			"1:1": "颜色:-6安踏白",
			"1:2": "颜色:-1黑/大红/安踏白",
			"1:3": "颜色:-5黑【推荐】",
			"1:4": "颜色:-3黑/安踏白",
			"1:5": "颜色:-4二度灰/亚麻灰/安踏白",
			"1:6": "颜色:-18黑【皮面】"
		},
		"seller_info": {
			"level": null,
			"shop_type": null,
			"user_num_id": 221247,
			"cid": null,
			"delivery_score": null,
			"item_score": null,
			"score_p": null,
			"zhuy": "//mall.jd.com/index-213251.html?from=pc",
			"search_id": "617610",
			"nick": "安踏悠购专卖店",
			"shop_name": "安踏悠购专卖店",
			"title": "安踏悠购专卖店"
		},
		"tmall": "false",
		"error": "",
		"warning": "",
		"url_log": [],
		"props_img": {
			"1:0": "//img14.360buyimg.com/n1/jfs/t1/167443/5/11561/189395/60487513E67e1ac89/6f2b0e24a15d2a07.jpg",
			"1:1": "//img10.360buyimg.com/n1/jfs/t1/161425/26/11624/223402/6048750bE7b82f057/24b57f419c846302.jpg",
			"1:2": "//img13.360buyimg.com/n1/jfs/t1/170137/21/11570/221223/6048750eE6f37af3b/485bda2785ac1eeb.jpg",
			"1:3": "//img12.360buyimg.com/n1/jfs/t1/166580/14/11814/282234/60487510E28b9a6a6/7276dcf61be1c212.jpg",
			"1:4": "//img10.360buyimg.com/n1/jfs/t1/166198/6/11018/211129/6048750eEe91f12ae/fc70a6a6c9119278.jpg",
			"1:5": "//img13.360buyimg.com/n1/jfs/t1/159863/10/12700/269705/60487512Ed2c190a7/d3e41f7e3f809632.jpg",
			"1:6": "//img14.360buyimg.com/n1/jfs/t1/170113/38/11563/205655/6048750cEa69d1123/61dfb5929923dd6f.jpg"
		},
		"shop_item": [],
		"relate_items": []
	},
	"secache": "29126e588509ddfeccfca167642f7bc2",
	"secache_time": 1615362960,
	"secache_date": "2021-03-10 15:56:00",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"reason": "",
	"error_code": "0000",
	"cache": 0,
	"api_info": "today:12 max:10000",
	"execution_time": 3.016,
	"server_time": "Beijing/2021-03-10 15:56:00",
	"client_ip": "106.6.35.144",
	"call_args": [
		"10335871600"
	],
	"api_type": "jd",
	"translate_language": "zh-CN",
	"translate_engine": "google_cn",
	"server_memory": "3.26MB",
	"request_id": "gw-3.60487b8d702d6"
}

接口测试请求

公共参数

名称类型必须描述
keyString调用key(必须以GET方式拼接在URL中)
secretString调用密钥
api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
langString[cn,en,ru]翻译语言,默认cn简体中文
versionStringAPI版本

文章内容有限,欢迎广大码友私信沟通交流! 

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐