Firefox 53: JSON Viewer on by default

Martin Brinkmann
Jan 12, 2017
Updated • Jan 12, 2017
Firefox
|
21

Mozilla plans to enable the built-in JSON Viewer of the Firefox web browser for all browser channels including Firefox Stable in Firefox 53.

The organization integrated the viewer in version 44 of the web browser, but did not enable it by default for all channels but the Developer Channel.

Firefox's JSON Viewer displays structured JSON data instead of the RAW data dump that one gets when the viewer or a third-party extension is not enabled.

Take a look at the following two screenshots to see the difference between unstructured JSON data, barely readable by humans, and the data presented by the JSON Viewer in Firefox.

firefox json data

firefox json viewer

As you can see, the data is displayed in a tree hierarchy with JSON Viewer enabled. It is still possible to switch to the raw data view with the viewer enabled. Other options that you may find interesting are to show or hide certain bits of data, to use a filter, and to save or copy data.

This is mostly useful for developers, as it provides them with a better representation of JSON data directly in the Firefox web browser. Useful for instance to understand how to retrieve information from the data.

JSON Viewer is part of all versions of Firefox already, but it is not enabled in all versions. While it is enabled in Firefox Developer Edition and Nightly for instance, it is not enabled in Firefox Stable. This will happen with the release of Firefox 53 which will come out on April 18th, 2017 if the Firefox release schedule is not changed.

You can enable JSON Viewer in all versions of Firefox right now if you don't want to wait for that to happen:

  1. Type about:config in the Firefox address bar and hit the Enter-key.
  2. Confirm that you will be careful if the warning prompt appears.
  3. Search for devtools.jsonview.enabled.
  4. Double-click on the preference name.

Setting the value of the preference to true enables the feature, while a value of false disables it. This means that you can disable the viewer in case you don't require it, or prefer to use a different extension or program for that instead.

You can follow the progress on Bugzilla. (via Sören Hentzschel)

Summary
Firefox 53: JSON Viewer on by default
Article Name
Firefox 53: JSON Viewer on by default
Description
Mozilla plans to enable the built-in JSON Viewer of the Firefox web browser for all browser channels including Firefox Stable in Firefox 53.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Tutorials & Tips


Previous Post: «
Next Post: «

Comments

  1. json viewer said on February 20, 2021 at 9:24 am
    Reply

    this online json viewer is good
    https://www.jsonformatting.com/

  2. pd said on June 14, 2018 at 2:34 am
    Reply

    Hey Martin

    Thanks for this.

    As I’m stuck on 56 at work due to Mozilla butchering their add-on API, I should have had this enabled already but for some unknown reason, it wasn’t.

    Very helpful to find your about:config reference.

    Ghacks rocks!

  3. Rafael Santana said on April 28, 2018 at 3:16 pm
    Reply

    My otherwise validated JSON document triggers this error message in FFJsonViewer:

    SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

    Viewing raw data reveals the presence of a couple of little question marks at the beginning of the raw file, which are not there in my text editor.

    Ideas of what’s going on? Thanks.

  4. georgexsh said on January 24, 2018 at 10:10 am
    Reply

    Could JSON Viewer be applied manually for responses with incorrect content-type?

  5. Ben said on January 13, 2017 at 4:51 pm
    Reply

    Using it for weeks now, it’s very nice to have it.
    Before that I had to copy json to notepad++ and prettyprint it there.

  6. jfjb said on January 13, 2017 at 2:55 pm
    Reply

    I don’t know about you guys, nor what the fuss is all about, but Notepad++ opens a very readable json file

    1. Chis said on January 14, 2017 at 12:03 am
      Reply

      How do you get Notepad++ to automatically open JSON files in a very readable format?

  7. Sören Hentzschel said on January 12, 2017 at 10:49 pm
    Reply

    > I’ve just switched it to true, here on Firefox 50.1.0 but all I get of a json file is its raw display, no means to get the structured view of the data.

    Works for me on Firefox 50.1. Of course Firefox has to know that the server response is JSON. That means the server has to send the correct response header (content-type).

    > Also, as I understand the article, this built-in JASON viewer has, will have no editing feature, is this correct?

    Yes, that’s correct. A editing feature does not make a lot of sense because it’s ja JSON *viewer* – another view for the json response from a server. You can’t edit the response from a server.

    1. Tom Hawack said on January 13, 2017 at 12:02 am
      Reply

      I answered above, Sören, because I got your reply via email before it was published.
      But I do have medium capacities, except with Flash :)

  8. Tom Hawack said on January 12, 2017 at 10:25 pm
    Reply

    I thought I knew the components of Firefox relatively well, yet I knew nothing of the availability of the devtools.jsonview.enabled setting.

    I’ve just switched it to true, here on Firefox 50.1.0 but all I get of a json file is its raw display, no means to get the structured view of the data. Perhaps, Martin,is the screenshot displayed in your article taken on a Firefox nightly build? Also, as I understand the article, this built-in JASON viewer has, will have no editing feature, is this correct?

    Up to nowI call upon the ‘JSON Editor Online’ at http://www.jsoneditoronline.org/ to view and edit json files. It’s well done, opens the file structures, allows search/edit, allows to compavt it back before saving : for whom may be interested.

    Looking forwards for Firefox’s built-in JSON viewer, especially with editing capacity.

    1. Tom Hawack said on January 12, 2017 at 11:18 pm
      Reply

      Solitude, when you answer yourself. Not really, considering I have telepathy powers and that I see an answer from Sören Hentzschel stating that the built-in Firefox JSON viewer works fine on his FF 50.1 (with of course devtools.jsonview.enabled set to true), adding “Of course Firefox has to know that the server response is JSON. That means the server has to send the correct response header.”.

      Well, I tested with a local JSON file. But if Firefox’s built-in PDF viewer reads local PDFs why wouldn’t the JSON viewer read local JSON files as well?

      I see no more … everything blur now, losing my power …. :)

    2. Jason said on January 12, 2017 at 10:41 pm
      Reply

      It works here with Firefox 50.1. Maybe it’s one of your add-ons that’s messing it up ? Or Firefox 64-bit ?

      People who want to try out can check this JSON file : http://live-menu.staugustinesvancouver.com/taps.json

      It’s pretty neat. (Grabbed the link from the Mozilla bug, comment 10.)

      1. Egad said on January 13, 2017 at 11:15 am
        Reply

        From this add-on’s page:
        “If you need to unblock some elements
        You can customize the settings in the add-on preferences. about:addons”

        I don’t know what the JSON viewer needs though. But if you can read PDF, which I think needs some resource: things too (?), then you may have the option to ask the author to let JSON viewer access what it needs or something.

      2. Tom Hawack said on January 13, 2017 at 12:17 am
        Reply

        @Jason, the culprit was indeed the ‘No Resource URI Leak’ Firefox add-on. Disabling it enabled your link to display the structured view.

        I’d rather keep ”No Resource URI Leak'” I guess.

        Thanks.

      3. Tom Hawack said on January 13, 2017 at 12:00 am
        Reply

        I’ve tested JSON on the link you provide : raw only. I’ve also set both hereafter to true and also restarted FF:
        extensions.bookmarkfaviconchanger.embedFaviconInJSON
        devtools.netmonitor.har.jsonp

        I’m running FF 50.1 64-BIT

        I think I know what my issue may be, that of an add-on called ‘No Resource URI Leak’- Investigating.

  9. Jamark said on January 12, 2017 at 7:19 pm
    Reply

    Anybody knows how open the *.jsonlz4 files?

    1. Lumpy Gravy said on January 13, 2017 at 11:18 pm
      Reply

      Have a look here.

  10. wolfsjunge said on January 12, 2017 at 7:04 pm
    Reply

    Why would the average Firefox user need something like this?

    1. Egad said on January 13, 2017 at 11:04 am
      Reply

      And why would the average user need “view source” or view cache ? I’m fucking glad people have the option to look around and eventually educate themselves without first having to break walled gardens of knowledge and tooling.

      It’s also a commodity. I still mourn the add-on Cache Viewer to this day, and it died in what, Firefox 3 ?

      Finally, developer tools are all included in Firefox release, so why not this one ? I shrug at your thought process, sir, I shrug at it, that’s what I do.

      1. Tom Hawack said on January 13, 2017 at 11:35 am
        Reply

        About JSON files : I have the use of not only a JSON viewer but also editor, i.e when cleaning Firefox’s xulstore.json file in my user’s profile when an add-on removal left traces in that file (seldom). This is why I consider a viewer is fine but an editor as well is better. But as far as a browser is concerned what is, IMO, essential are viewers when specific viewers are required to read specific formats found online, far more than images and videos. I appreciate the built-in PDF viewer, HTML5, anything which allows a browser to emancipate from 3-rd party tools when it comes to accessing, viewing, hearing a site’s content. Edition itself is not, IMO, related to the fundamentals of a browser.

        About a Cache Viewer add-on for Firefox : there have been and remain several. The one I use is totally functional here on Firefox 50.1.0 64-BIT :
        CacheViewer at https://addons.mozilla.org/en-US/firefox/addon/cacheviewer/

    2. hahaha said on January 13, 2017 at 2:51 am
      Reply

      I have the same question…

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.