Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-276

Cannot use $.getJSON on a local file

    XMLWordPrintableJSON

Details

    Description

      I have the following code in my JS:

      $.getJSON('json/somefile.json').success(function(data)

      { ... }

      );

      Where somefile.json has been set to "Content".

      The console gives me the following message:
      Wrapped XHR received Error from FileAPI :: [object Object]

      Where the object contains:

      Unable to find source-code formatter for language: 1. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      
      

      Any idea on the matter?

      Attachments

        1. LondonWP7_simple.zip
          135 kB
          Jesus Bosch

        Activity

          People

            purplecabbage Jesse MacFadyen
            iksela Alexandre Mathieu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: