【发布时间】:2012-02-21 05:15:39
【问题描述】:
我正在玩Trello API,我正在慢慢掌握它。我被困在一个地方,我设法在特定列表中创建一张新卡,但我想解析我从“createCard”调用中得到的响应,例如获取新卡的ID。
这是我的 Trello 创建卡片帖子:
Trello.post("cards", { name: "Card Created from MVC", desc: "This is the description of the card.", idList: "??????????" }).done(onCardCreated());
出于安全原因,我省略了真正的 idList 值。
我可以立即在我的 Trello 板上看到卡片。我从这个电话中得到的回应是这样开始的:
jQuery1510518084118841216_1327764237952({"id":"????","name":"Card Created from MVC","desc":........)
我期待看到返回的 JSON 是这样的:
{"id":"????","name":"Card Created from MVC","desc":....}
但在这种情况下,JSON 被包裹在这个 jQuery1510518084118841216_1327764237952 事物中。
谁能告诉我 jQuery 的用途是什么,以及如何获取其中的 JSON 数据?
【问题讨论】: