Windows 8 Metro アプリ用に WinJS で Flickr データ フィードを呼び出しています。JSON.parse を使用してフィード レスポンスを解析しようとすると、無効な文字エラーが発生します。これが私のコードです:
function processPhotos(result)
{
var photoData = JSON.parse(result.responseText);
//bind here
data.items.forEach(function (item) {
list.push(item);
});
}
function processError(error) {
console.log(error.message);
}
WinJS.xhr({ url: "http://api.flickr.com/services/feeds/photos_public.gne?format=json" }).then(processPhotos, processError);
WinJS.Namespace.define("data", {
items: groupedItems,
groups: groupedItems.groups,
getItemsFromGroup: getItemsFromGroup
});
Result.ResponseText には期待されるコンテンツがあります。
他の誰かがこれに遭遇しますか?