K
K
kirill3215922018-10-19 12:21:41
JSON
kirill321592, 2018-10-19 12:21:41

Json Uncaught SyntaxError: Unexpected token: how to solve?

When I send a get request to the server, I get

data.json?callback=jQuery1111073…_1539940574412&_=1539940574413:2 Uncaught SyntaxError: Unexpected token :

$.ajax({
      
                    url: 'http://www.mrsoft.by/data.json',
                     jsonCallback: 'data',
                         dataType: 'jsonp',
                    success: function(json){
                        alert(json);
                        
                    }
                 
                });
              
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
qq1, 2018-10-19
@qq1

Your endpoint does not support jsonp, the callback parameter is ignored

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question