title: Fetch API cannot load file:///C:/Users/woshi/Desktop/P5/p5/JSON/birds.json. URL scheme must be "http" or "https" for CORS request
body: <p>When I run my code it errors with:</p>
  
  <blockquote>
    <p>Fetch API cannot load
    file:///C:/Users/woshi/Desktop/P5/p5/JSON/birds.json. URL scheme must
    be "http" or "https" for CORS request</p>
  </blockquote>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>//birds.js
  var data;
  
  function preload() {
   data = loadJSON("birds.json");
  }
  
  function setup() {
   noCanvas();
  }
  
  function draw() {
   var bird = data.birds[1].members[2];
   CreateP(bird);
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>//birds.json
  
  {
    "description": "Birds of Antarctica, grouped by family",
    "source": "https://en.wikipedia.org/wiki/List_of_birds_of_Antarctica",
    "birds": [
      {
        "family": "Albatrosses",
        "members": [
          "Wandering albatross",
          "Grey-headed albatross",
          "Black-browed albatross",
          "Sooty albatross",
          "Light-mantled albatross"
        ]
      },
      {
        "family": "Cormorants",
        "members": [
          "Antarctic shag",
          "Imperial shag",
          "Crozet shag"
        ]
      },
      {
        "family": "Diving petrels",
        "members": [
          "South Georgia diving petrel",
          "Common diving petrel"
        ]
      },
      {
        "family": "Ducks, geese and swans",
        "members": [
          "Yellow-billed pintail"
        ]
      },
      {
        "family": "Gulls",
        "members": [
          "Kelp gull"
        ]
      },
      {
        "family": "Penguins",
        "members": [
          "King penguin",
          "Emperor penguin",
          "Gentoo penguin",
          "Adelie penguin",
          "Chinstrap penguin",
          "Rockhopper penguin",
          "Macaroni penguin"
        ]
      },
      {
        "family": "Shearwaters and petrels",
        "members": [
          "Antarctic giant petrel",
          "Hall's giant petrel",
          "Southern fulmar",
          "Antarctic petrel",
          "Cape petrel",
          "Snow petrel",
          "Great-winged petrel",
          "White-headed petrel",
          "Blue petrel",
          "Broad-billed prion",
          "Salvin's prion",
          "Antarctic prion",
          "Slender-billed prion",
          "Fairy prion",
          "Grey petrel",
          "White-chinned petrel",
          "Kerguelen petrel",
          "Sooty shearwater"
        ]
      },
      {
        "family": "Sheathbills",
        "members": [
          "Snowy sheathbill"
        ]
      },
      {
        "family": "Skuas and jaegers",
        "members": [
          "South polar skua",
          "Brown skua"
        ]
      },
      {
        "family": "Storm petrels",
        "members": [
          "Grey-backed storm petrel",
          "Wilson's storm petrel",
          "Black-bellied storm petrel"
        ]
      },
      {
        "family": "Terns",
        "members": [
          "Arctic tern",
          "Antarctic tern"
        ]
      }
    ]
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>//birds.html
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;JSON&lt;/title&gt;
      &lt;script src="../p5.js"&gt;&lt;/script&gt;
      &lt;script src="../p5.dom.js"&gt;&lt;/script&gt;
      &lt;script src="../p5.sound.js"&gt;&lt;/script&gt;
      &lt;script src="birds.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>