在IE中将JSON显示为HTML格式而无需下载 [英] Display JSON in IE as HTML Without Download

查看:234
本文介绍了在IE中将JSON显示为HTML格式而无需下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望JSON文件和下载直接在IE浏览器中显示-就地浏览. 有许多文章描述了在浏览器中为application/json设置CLSID值的技术.

I want JSON files and downloads to be displayed directly in the IE browser -- Browse in Place. There are many posts that describe the technique of setting the CLSID value for application/json in the browser.

例如: 如何我说服IE只是显示application/json而不是提供下载?

我已经在IE 11(11.0.9600.17416)和Windows 10上进行了测试.

I have tested on IE 11 (11.0.9600.17416) and Windows 10.

我更改了设置,甚至重新启动,但总是提示我下载JSON.

I changed the setting and even then rebooted, but I am always prompted to download the JSON.

运行脚本以更改regedit后,我将看到以下内容:

After running the script to alter regedit, I see the following:

推荐答案

我尝试通过

I try to refer the answer in that referenced thread.

我在Windows 10 IE 11(11.1.18362.0)版本上进行了此测试.

I made this test on Windows 10, IE 11 (11.1.18362.0) version.

我只是尝试参考以下步骤.

I simply try to refer the steps below.

(1)尝试打开记事本并将下面的代码粘贴到其中.

(1) Try to open Notepad and paste the code below in it.

Windows Registry Editor Version 5.00
;
; Tell IE to open JSON documents in the browser.  
; 25336920-03F9-11cf-8FD0-00AA00686F13 is the CLSID for the "Browse in place" .
;  

[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/json]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=hex:08,00,00,00

[HKEY_CLASSES_ROOT\MIME\Database\Content Type\text/json]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=hex:08,00,00,00

(2)将文件另存为 json-ie.reg

(3)双击该文件以运行脚本并允许其创建密钥.

(3) Double click the file to run the script and allow it to create a key.

(4)尝试双击json文件,它会在IE 11中打开,没有任何问题.

(4) Try to double click the json file and it opens in IE 11 without any issue.

输出:

这篇关于在IE中将JSON显示为HTML格式而无需下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆