• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

bhollis/jsonview: A web extension that helps you view JSON documents in the brow ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

bhollis/jsonview

开源软件地址:

https://github.com/bhollis/jsonview

开源编程语言:

TypeScript 74.3%

开源软件介绍:

JSONView

JSONView is a Web extension compatible with Firefox and Google Chrome that helps you view JSON documents in the browser.

Normally when encountering a JSON document (content type application/json), Firefox simply prompts you to download the view. With the JSONView extension, JSON documents are shown in the browser similar to how XML documents are shown. The document is formatted, highlighted, and arrays and objects can be collapsed. Even if the JSON document contains errors, JSONView will still show the raw text.

Once you've got JSONView installed, check out this example JSON file to see the extension in action!

If you'd like to contribute to JSONView but don't want to code, consider contributing a translation. Copy the existing localization files from src/_locale and fill them in for your own language, then send a pull request. You can do it all from the GitHub interface. There's not many strings to translate!

Keyboard Shortcuts

  • Left Arrow - Collapses the json on key up
  • Right Arrow - Expands the json on key up

Reporting Issues

Use the GitHub Issue tracker for JSONView to file issues. Pull requests are especially welcome.

Developing JSONView

Before contributing to JSONView, make sure to read the Contributing Guidelines. I appreciate contributions people make to JSONView, but the goal of the extension is to be simple and straightforward, so I frequently reject contributions that add complexity or unnecessary features. Please consider filing an issue before doing any work, so you don't waste time on something I won't accept.

  • Install NodeJS and Yarn.
  • Check out jsonview.
  • Run yarn inside the jsonview repository.
  • Run yarn start to build the extension.
  • In Firefox, go to about:debugging#addons in the address bar, check "Enable add-on debugging", select "Load Temporary Add-on", and choose the jsonview/build folder.
  • In Chrome, go to chrome://extensions/ in the address bar, select "Load Unpacked", and choose the jsonview/build folder.

JSONView makes use of TypeScript. I recommend VSCode for editing the code - it will automatically prompt to install the correct extensions, and will highlight errors. All of the code that makes up the extension itself are in src/.

Common Issues

  • JSONView isn't displaying my file as JSON: You are probably not serving the JSON with the "application/json" MIME type.
  • Opening a local .json file uses the Firefox default JSON viewer: You need to disable the built-in JSON viewer to use JSONView. Go to "about:config" and set "devtools.jsonview.enabled" to "false".

JSONView is open source software under the MIT licence.

Publishing

npm start

jsonview.zip can then be manually uploaded to the extension sites.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
hasura/gitkube: Build and deploy docker images to Kubernetes using git push发布时间:2022-07-09
下一篇:
rs/zerolog: Zero Allocation JSON Logger发布时间:2022-07-08
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap