jsonovich


Pretty-prints JSON content in the Firefox family of browsers for easy, unobtrusive viewing.

JSONovich

Pretty-prints JSON content in the Firefox family of browsers for easy, unobtrusive viewing.

http://imageshack.us/photo/my-images/836/jsonovich1.png/' title='JSONovich 1.7 in action'>http://img836.imageshack.us/img836/5236/jsonovich1.th.png' alt='JSONovich 1.7 in action' border='0' />http://imageshack.us/photo/my-images/196/jsonovich2.png/' title="JSONovich 1.9's new options screen for Firefox 7+, Mobile 7+ and SeaMonkey 2.4+">http://img196.imageshack.us/img196/589/jsonovich2.th.png' alt="JSONovich 1.9's new options screen for Firefox 7+, Mobile 7+ and SeaMonkey 2.4+" border='0' />http://imageshack.us/photo/my-images/16/28534.png/' title='JSONovich pre-1.5'>http://img16.imageshack.us/img16/9642/28534.th.png' alt='JSONovich pre-1.5' border='0' />http://imageshack.us/photo/my-images/542/28332.png/' title='JSONovich pre-0.8'>http://img542.imageshack.us/img542/6164/28332.th.png' alt='JSONovich pre-0.8' border='0' />

JSONovich is a http://www.getfirefox.com/'>Firefox (and http://www.seamonkey-project.org/'>SeaMonkey) extension that pretty-prints JSON content of various types directly in a browser tab. It uses the browser's native JSON parser and a custom-built formatter to produce its output.

Normally, Firefox would either prompt to download or display as plain text any JSON sent with the correct application/json mime-type. JSONovich makes working with and debugging output from web services easier by formatting JSON nicely inside the browser.

Features

  • Syntax highlighting of JSON elements. [since 0.1]
  • Indentation according to JSON object/array nesting level. [since 0.1]
  • Line numbering based on JSON nodes and brackets, long strings always count as a single line. [since 0.8]
  • Collapsible objects and arrays (whole line is clickable, not just a tiny +/- symbol). [since 1.5]
  • Subtle zebra-stripes for easier reading. [since 1.7]
  • Preserves formatting accurately when copying to clipboard, excluding line numbers. [since 0.9]
  • Currently supports the following MIME types by default:
    • application/json [since 0.1] (also legacy unofficial types application/x-json [since 1.8.2], text/json [since 1.8.2] and text/x-json [since 0.1])
    • application/jsonrequest [since 1.6]
    • application/sparql-results+json [since 0.9.1]
    • application/schema+json [since 1.8.2]
    • application/jsonml+json [since 1.8.2]
    • application/rdf+json [since 1.4]
    • application/javascript and variations [since 1.9.2]
    The above list is customisable by user preferences. [since 1.8.2]
  • Supports loading JSON from files on disk with the following extensions by default:
    • .json [since 1.8]
    • .srj [since 1.8.2]
    The above list is customisable by user preferences. [since 1.8.2]
  • Adds application/json to the default HTTP Accept header to make working with CouchDB easier. [since 1.1, optional since 1.8.2]
  • Can override the default HTTP Accept header for individual hosts to either remove application/json or add it with a specific quality factor. [since 1.9]
  • Options can be changed via the Add-ons Manager in Firefox 7+, Mobile 7+ and SeaMonkey 2.4+. [since 1.9]
  • Options can be changed via about:config (extensions.jsonovich branch) in all browsers. [since 1.8]
  • Restartless (even in older browsers, partially). [since 1.8]
  • Full support for documents served with unusual character sets as well as the official UTF8. [fixed in 1.9]
Testing
  • Want some sample JSON?
  • Want to see how it handles invalid JSON?
  • Or perhaps some Unicode?
  • See how it handles JSON with HTML entities?

FAQ

  • What's with the weird name?
    JSONovich is named after Pavement member Bob Nastanovich primarily because he seems like a swell guy.
  • And the logo?
    That's called an Ambihelical Hexnut, an optical illusion similar to the impossible torus that is the JSON logo.

Helping Out

  • Hunt for Bugs
    To report a problem, please create an issue.
  • Translate to your Language
    Feel free to add your language to our Transifex page.
  • Dig into the Code
    • Checkout the code.
    • Create a clean browser profile for development.
    • Place a proxy file in your profile/extensions directory called jsonovich@lackoftalent.org (no .txt extension). It should contain the path to the checked out src directory including a trailing slash.
      • There is also a jake build system for those with node.
    • Hack at code.
    • To see changes, either disable and re-enable the addon to save time, or restart the browser to be sure unload bugs don't affect the next test.
    • Attach any patches to issues here and we can integrate them in the next release.

License

This extension is MPL 1.1/GPL 2.0/LGPL 2.1 tri-licensed.

Project Information

Labels:
JSON restartless extension addon add-on XPI Mozilla Firefox Fennec SeaMonkey JavaScript Developer DevTool API Debug