【发布时间】:2012-03-21 20:53:19
【问题描述】:
我在我的网站商店中使用 ECWID,并且想要创建一些代码,为此我必须执行一些 JSON 请求,但我从未使用过 JSON。当我在地址栏中输入以下内容时: http://app.ecwid.com/api/v1/STOREID/product?id=PRODUCTID 当然,将 storeid 和 productid 替换为引用我的商店和特定产品的数字,我会收到
的文本返回{
"id": 8443685,
"sku": "KEN000025",
"smallThumbnailUrl": "picture URL here",
"thumbnailUrl": "thumbnail URL here",
"imageUrl": "image URL here",
"name": "Kenwood Excelon KFC-X173",
"price": 99.99,
"weight": 1.0,
"url": "long URL here",
"description": "long description here",
"options": [],
"taxes": [],
"galleryImages": [],
"categories": [
{
"id": 769355,
"thumbnailUrl": "url here",
"name": "Speakers",
"url": "url here",
"description": ""
},
{
"id": 1466304,
"parentId": 1466305,
"thumbnailUrl": "URL here",
"name": "Kenwood",
"url": "URL here",
"description": ""
}
],
"dateAdded": 1325037351
}
现在,如果我有一个 HTML 文档,并且我想输出一个项目的图片,那么低于它的价格,我将如何使用来自 JSON 链接的信息来做到这一点。
PS 我知道 Java 脚本 HTML PHP XML 和许多其他语言,只是不知道 JSON 谢谢
【问题讨论】:
-
那么,你想用javascript来做吗? php?
-
javascript 会工作感谢您的回复
-
有没有适合您的解决方案?
标签: php javascript html json