JSONView 插件的添加 给Chrom浏览器添加JSONView的插件

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

我试着给Firefox 和360浏览器添加插件但是都不行,要不就是下载不下来,要不就是没有。

最后找到了Chrom的浏览器,在google里面搜索了一下,下面是添加的地址:


https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=zh-cn


如果访问不了外网:也可以手动添加:

先下载,下载地址:http://download.csdn.net/detail/lgh06/8775787

然后:

  1. 如图,打开Chrome浏览器,依次点击A->B->C进入插件管理界面。

    【怎么安装Chrome插件】安装Chrome第三方插件
  2. 如图,这是Chrome插件管理界面。将下载好的crx插件文件拖到Chrome插件管理界面中去,松开鼠标即可。

    【怎么安装Chrome插件】安装Chrome第三方插件
  3. 如图,Chrome会弹出安装插件的提示,点击添加。

    【怎么安装Chrome插件】安装Chrome第三方插件
  4. 4

    安装完成之后的界面,基本上到这一步就能在Chrome插件管理界面看到安装之后的插件了。其中右上角的菜单条会出现插件的设置按钮(部分插件此处没有设置按钮)。


















随便摘录一下JSONView作者的blog:

http://benhollis.net/blog/2009/02/24/jsonview-view-json-documents-in-firefox/


JSONView - View JSON documents in Firefox

February 24th, 2009 JSONView

I’m a big fan of JSON as a data exchange format. It’s simple, lightweight, easy to produce and easy to consume. However, JSON hasn’t quite caught up to XML in terms of tool support. For example, if you try to visit a URL that produces JSON (using the official “application/json” MIME type), Firefox will prompt you to download the file. If you try the same thing with an XML document, it’ll display a nice formatted result with collapsible sections. I’ve always wanted a Firefox extension that would give JSON the same treatment that comes built-in for XML, and after searching for it for a while I just gave up and wrote my own. TheJSONView extension (install) will parse a JSON document and display somethingprettier, with syntax highlighting, collapsible arrays and objects, and nice readable formatting. In the case that your JSON isn’t really JSON (JSONView is pretty strict) it’ll display an error but still show you the text of your document. If you want to see the original text at any time, it’s still available in “View Source” too.

JSONView logo

I’ve been eager to release this for some time, but I finally pushed it to addons.mozilla.org last night. I actually started development on it about 7 months ago, but work got paused on it for about 6 months due to stuff out of my control, and then I had someother projects I was working on. The actual development only took a few days (including digging through some confusing Unicode bugs). I thought it was funny that right as I was resuming work on JSONView I noticed that aJSON explorer had actually landed for Firebug 1.4, which I’ll also be looking forward to. Initially I had intended to build that functionality as part of my extension. There’s a lot I’d like to add on, likeJSONP support anda preference to send the “application/json” MIME type in Firefox’s accept headers.

This is actually my first real open source project - I’ve released some code under open source licenses before, but this is actually set up atGoogle Code with an issue tracker and public source control and everything. I’ve licensed it under the MIT license. I’m really hoping people get interested in improving the extension with me. I’ve pre-seeded theissue tracker with some known bugs and feature requests.

The extension itself is pretty simple. I wasn’t sure how to approach the problem of supporting a new content type for Firefox, so I followed the example of thewmlbrowser extension and implemented a customnsIStreamConverter. What this means is that I created a new component that tells Firefox “I know how to translate documents of type application/json into HTML”. And that it does - parsing the JSON using the newnative JSON support in Firefox 3 (for speed and security) and then constructing an HTML document that it passes along the chain. This seems to work pretty well, though there are some problems - some parts of Firefox forget the original type of the document and treat it as HTML, so “View Page Info” reports “text/html” instead of “application/json”, “Save as…” saves the generated HTML, Firebug sees the generated HTML, etc. Just recently I came across thensIURLContentListener interface, which might offer a better way of implementing JSONView, but I’m honestly not sure - the Mozilla documentation is pretty sparse and it was hard enough to get as far as I did. I’m hoping some Mozilla gurus can give me some pointers now that it’s out in the open.

Right now the extension is versioned at “0.1b1” which is a wimpy way of saying “this is a first release and it could use some work”. It’s also trapped in the “sandbox” ataddons.mozilla.org, where it will stay until it gets some downloads and reviews. Please check it out, write a little review, and soon people won’t have to log in to install it!

Note: While composing this post I ran across the JSONovich extension which was apparently released in mid-December and seems to do similar stuff to JSONView. No reason we can’t have two competing extensions, though.

I'm Benjamin Hollis, a software developer in Seattle. Check out my website.

           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

这里写图片描述

猜你喜欢

转载自blog.csdn.net/qq_43682769/article/details/84073064
今日推荐