代码改变世界

View JSON in Internet Explorer

2011-11-04 14:45  无名365  阅读(414)  评论(0编辑  收藏  举报

By default, IE doesn't support to view json format content, However developers often need to view json data in IE.

Here shows how to modify reg table to support json display in IE.

  1. Open Notepad and paste the following:
  2. ; Tell IE 7,8,9 to open JSON documents in the browser on Windows XP and later.
    ; 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
  3. Save document as IE-Json.reg and then run it.

Note: This has been tested on Windows XP and Windows 7 using IE 7, 8, 9.