0
외부 URL에서 JSON을 가져 오려고합니다. 도메인 간 문제로 야후 YQL 서비스를 사용합니다.jQuery 도메인 간 요청 JSON : null의 'json'속성을 읽을 수 없습니다.
는 오류가 발생합니다 : 이
이 팁 주셔서 감사 널 (null)의 특성 'JSON'을 읽을 수 없습니다! 당신은 JSON 응답에 null
검사를 추가 할 필요가
외부 URL에서 JSON을 가져 오려고합니다. 도메인 간 문제로 야후 YQL 서비스를 사용합니다.jQuery 도메인 간 요청 JSON : null의 'json'속성을 읽을 수 없습니다.
는 오류가 발생합니다 : 이
이 팁 주셔서 감사 널 (null)의 특성 'JSON'을 읽을 수 없습니다! 당신은 JSON 응답에 null
검사를 추가 할 필요가
$.ajax({
url: "http://query.yahooapis.com/v1/public/yql",
dataType: "jsonp",
jsonp: "callback",
error: function() {
\t alert('There is an error with rawdata');
},
success: function(response) {
\t \t schema = [];
\t \t object = [];
\t \t data = [];
\t \t
var schema = response.query.results.json.schema;
var options = response.query.results.json.options;
var data = response.query.results.json.data;
console.log("schema: ", schema); // server response
console.log("options: ", options); // server response
console.log("data: ", data); // server response
\t //$("#productEditor").alpaca("destroy");
\t \t //jsonEditor(schema, options, data);
}, data: {
q: "select * from json where url=\"https://www.webongo.de/data.json?format=json?callback=?\"",
format: "json"
},
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
가능성이 YQL에 잘못된 쿼리를 전달하고 있습니다, –