The JSON View is hard to use

RESOLVED INVALID

Status

()

Firefox
Developer Tools: JSON Viewer
RESOLVED INVALID
2 years ago
2 years ago

People

(Reporter: natim, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(5 attachments)

(Reporter)

Description

2 years ago
Created attachment 8700999 [details]
JsonView expectations

In the last Firefox Developer Edition I've got the JSONView enabled.

I cannot use it for multiple reason:

- I cannot read it is too dark
- Everything is closed by default so I have to click multiple time to open all child
- It adds some utility inside the page that are not returned by the server.

I have added a screenshot of what I was expecting on this JSONView.
I am just looking for what is returned by the server with coloration and easy navigation.
(Reporter)

Comment 1

2 years ago
Created attachment 8701000 [details]
What I currently see
(Reporter)

Comment 2

2 years ago
Created attachment 8701003 [details]
Another example expectation
(Reporter)

Comment 3

2 years ago
Created attachment 8701004 [details]
Another example with JsonView
(Reporter)

Comment 4

2 years ago
Created attachment 8701005 [details]
AnotherExample with JSONView Open

Here we can see that it also adds some index on the list.
(In reply to Rémy Hubscher (:natim) from comment #0)
> - I cannot read it is too dark

Agreed. We should probably file a separate bug on this.

> - Everything is closed by default so I have to click multiple time to open
> all child

Do JsonView auto-expand everything or is there some kind of algorithm it uses to not go too deep?

> - It adds some utility inside the page that are not returned by the server.

I don't understand what you mean here, what is added?  Do you mean the data [ 10 ] where it shows the size of the array?

Seems like you're also pointing out that the first newline with the curly brace helps make it more readable.  I'd agree.
(In reply to Bryan Clark (Firefox PM) [:clarkbw] from comment #5)
> (In reply to Rémy Hubscher (:natim) from comment #0)
> > - I cannot read it is too dark
> 
> Agreed. We should probably file a separate bug on this.

bug 1232613 updated this.

> > - Everything is closed by default so I have to click multiple time to open
> > all child
> 
> Do JsonView auto-expand everything or is there some kind of algorithm it
> uses to not go too deep?
> 
> > - It adds some utility inside the page that are not returned by the server.
> 
> I don't understand what you mean here, what is added?  Do you mean the data
> [ 10 ] where it shows the size of the array?
> 
> Seems like you're also pointing out that the first newline with the curly
> brace helps make it more readable.  I'd agree.
Flags: needinfo?(rhubscher)

Comment 7

2 years ago
> > - Everything is closed by default so I have to click multiple time to open
> > all child
> 
> Do JsonView auto-expand everything or is there some kind of algorithm it
> uses to not go too deep?

Let me jump in: an "expand-all" button would be great; but if possible, I would also use a simple algorithm to auto-expand the document: expand the items until the json fills the whole window, then stop. I don't know if that's possible, but for sure it's practical: there's no need to keep all that empty space, but expanding everything by default may be as wrong as having everything closed by default.

About expanding items automatically, it would be great if it expanded items also when searching; there's a discussion going on on this already in bug 1217131
(Reporter)

Comment 8

2 years ago
To me it seems important to keep the {} and [] structure. It seems the JSONView removes the root brackets for example.
Flags: needinfo?(rhubscher)
(In reply to Rémy Hubscher (:natim) from comment #8)
> To me it seems important to keep the {} and [] structure. It seems the
> JSONView removes the root brackets for example.

This has been filed as bug 1244920
(In reply to armisael from comment #7)
> > > - Everything is closed by default so I have to click multiple time to open
> > > all child
> > 
> > Do JsonView auto-expand everything or is there some kind of algorithm it
> > uses to not go too deep?
> 
> Let me jump in: an "expand-all" button would be great; but if possible, I
> would also use a simple algorithm to auto-expand the document: expand the
> items until the json fills the whole window, then stop. I don't know if
> that's possible, but for sure it's practical: there's no need to keep all
> that empty space, but expanding everything by default may be as wrong as
> having everything closed by default.

I'm not sure but we can look into that in the bug. 

I filed bug 1247064 for investigating auto-expanding, I think there are a couple of pieces to it.
And finally I'm going to close this bug, its more of a meta bug that I believe has now been broken down into all the necessary specific and actionable pieces on other bugs.  If you'd like to follow the progress of what was discussed here please add yourself to the other bugs.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.