|
京东的接口代码调用是这样的
public JdClient client=new DefaultJdClient(SERVER_URL,accessToken,appKey,appSecret);
CategoryReadFindAttrByIdJosRequest request=new CategoryReadFindAttrByIdJosRequest();
request.setAppId( "jingdong" );
request.setName( "jingdong" );
request.setAttrId( 123 );
request.setField( "jingdong,yanfa,pop" );
CategoryReadFindAttrByIdJosResponse response=client.execute(request);
然后有赞的话这个HTTP请求是我自己写的吗?还有就是我通过网页连接直接得到的数据是如图1这样,不是中文的,这个要怎么弄呢?
然后写完以后我如果得到了这些信息,我是通过自己写json解析还是有什么别的方法呢?
{
"response": {
"items": [
{
"cid": 8000017,
"promotion_cid": 0,
"tag_ids": "",
"detail_url": "https://shop14744486.koudaitong.com/v2/showcase/goods?alias=1yhi5kiocmuim&from=wsc&kdtfrom=wsc",
"share_url": "https://shop14744486.koudaitong.com/v2/showcase/goods?alias=1yhi5kiocmuim&from=wsc&kdtfrom=wsc",
"skus": [],
"pic_url": "https://dn-kdt-img.qbox.me/upload_files/2016/03/14/Flt46NpGjyo9j5D-GVH6Ucx2hkYu.jpg",
"pic_thumb_url": "https://dn-kdt-img.qbox.me/upload_files/2016/03/14/Flt46NpGjyo9j5D-GVH6Ucx2hkYu.jpg!120x120.jpg",
"num": "10",
"sold_num": 0,
"price": "100.00",
"post_type": null,
"post_fee": "0.00",
"delivery_template_fee": null,
"delivery_template_id": 0,
"delivery_template_name": "",
"item_imgs": [
{
"url": "https://dn-kdt-img.qbox.me/upload_files/2016/03/14/Flt46NpGjyo9j5D-GVH6Ucx2hkYu.jpg",
"thumbnail": "https://dn-kdt-img.qbox.me/upload_files/2016/03/14/Flt46NpGjyo9j5D-GVH6Ucx2hkYu.jpg?imageView2/2/w/290/h/290/q/75/format/jpg",
"medium": "https://dn-kdt-img.qbox.me/upload_files/2016/03/14/Flt46NpGjyo9j5D-GVH6Ucx2hkYu.jpg?imageView2/2/w/600/h/0/q/75/format/jpg",
"combine": "https://dn-kdt-img.qbox.me/upload_files/2016/03/14/Flt46NpGjyo9j5D-GVH6Ucx2hkYu.jpg?imageView2/2/w/600/h/0/q/75/format/jpg",
"id": "616108142",
"created": "2016-04-20 21:00:40"
},
{
"url": "https://dn-kdt-img.qbox.me/upload_files/2016/03/14/FkKy5GWH7CTeMFfOY2bFlUqF3BbK.png",
"thumbnail": "https://dn-kdt-img.qbox.me/upload_files/2016/03/14/FkKy5GWH7CTeMFfOY2bFlUqF3BbK.png?imageView2/2/w/290/h/290/q/75/format/png",
"medium": "https://dn-kdt-img.qbox.me/upload_files/2016/03/14/FkKy5GWH7CTeMFfOY2bFlUqF3BbK.png?imageView2/2/w/600/h/0/q/75/format/png",
"combine": "https://dn-kdt-img.qbox.me/upload_files/2016/03/14/FkKy5GWH7CTeMFfOY2bFlUqF3BbK.png?imageView2/2/w/600/h/0/q/75/format/png",
"id": "616885734",
"created": "2016-04-20 21:00:40"
}
],
"item_tags": [],
"item_type": 0,
"is_supplier_item": false,
"is_virtual": false,
"is_listing": false,
"is_lock": false,
"is_used": false,
"product_type": "0",
"auto_listing_time": "1461149599",
"has_component": false,
"template_id": 0,
"template_title": "",
"join_level_discount": "1",
"messages": [
{
"name": "配送时间",
"type": "text",
"multiple": 0,
"required": 1
}
],
"order": 0,
"num_iid": "229414565",
"alias": "1yhi5kiocmuim",
"title": "测试留言",
"desc": "",
"origin_price": "",
"outer_id": "",
"outer_buy_url": "",
"buy_quota": "0",
"created": "2016-03-14 10:50:24"
}
],
"total_results": "3"
}
}
|
|