local json file
Closed this issue ยท 2 comments
timdw5s commented
Is there a way to view a local file using the tool? If I put a local file in the address field it is not showing it formatted...for example:
file:///C:/myjson.json
gildas-lormeau commented
Yes, you just have to open the extensions page [1] and click on the "Allow access to file URLs" checkbox of the JSONView extension.
[1] chrome://chrome/extensions/
ConorSheehan1 commented
Doesn't seem to work with the latest version of chrome (72).
I have "Allow access to file URLs" enabled, but I get an error in the console when using the file protocol:
test.json:1 Access to XMLHttpRequest at 'file:///home/$me/test.json'
from origin 'chrome-extension://chklaanhfefbnpoihckbnefhakgolnmc' has been blocked by CORS policy:
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
Environment
OS: Ubuntu 16.04
Google Chrome: 72.0.3626.109
JSONView: 0.0.32.3
JSONView trigger: On click