title: how to use ajax to get a json file in github
body: <p>I want to use ajax to get a json file in github, I wrote this code:</p>
  
  <pre><code>$.ajax({
     url: "https://rawgit.com/nianyuyu/play_javascript/master/1.json",
      type:"get",
      dataType:'json',  
      success: function(data){
        console.log(data);
      },
      error:function() {
        console.log("err");
      }
  });
  </code></pre>
  
  <p>but I always get "err" and I check the network , it gets the data
  <a href="https://i.stack.imgur.com/x4Ksp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x4Ksp.png" alt="enter image description here"></a></p>
  
  <p>How can I solve this problem, thank you!</p>