json-viewer icon indicating copy to clipboard operation
json-viewer copied to clipboard

Empty arrays and objects take a huge amount of space

Open jribbens opened this issue 3 years ago • 6 comments

Empty arrays and objects, i.e. "foo": [], "bar": {} take up three lines of space, to show literally nothing. They should just be displayed as one line saying "foo": [] or "bar": {} with no option to expand (since there is nothing to expand).

jribbens avatar May 18 '21 12:05 jribbens

Same here, would be nice if they were just unclickable and permanently collapsed/folded instead.

TheYuriG avatar Mar 19 '23 10:03 TheYuriG

@TheYuriG Bit cheeky of me, but due to lack of progress on this I went and wrote my own JSON extension from scratch which fixes this and all the other issues I had with this and other existing JSON extensions. Also my one is the only one that can cope with large JSON files (up to 500MB...) :-) https://chrome.google.com/webstore/detail/json-wrangler/kgmhfbhlcdhjldpbjgoaljbpendgkede?hl=en-GB

jribbens avatar Mar 19 '23 20:03 jribbens

wrote my own JSON extension

Doesn't work for me, gives a black screen altogether. Probably clashing with another extension I have installed because works fine in incognito mode.

Probably a good extension for someone that didn't try this one yet, but it lacks the ability to collapse all properties recursively, which this extension has, so it's not worth it for me to switch over.

Also missing several other features that this extension has, like themes. Has a good syntax highlight though.

TheYuriG avatar Mar 20 '23 08:03 TheYuriG

Doesn't work for me, gives a black screen altogether. Probably clashing with another extension I have installed because works fine in incognito mode.

I'm pretty sure any of the JSON-display extensions will have issues if you install/enable more than one at once ;-)

Probably a good extension for someone that didn't try this one yet, but it lacks the ability to collapse all properties recursively, which this extension has, so it's not worth it for me to switch over.

If you file an issue at https://github.com/jribbens/json-wrangler I'll probably get round to that at some point.

Also missing several other features that this extension has, like themes. Has a good syntax highlight though.

It is true that I've adopted the philosophy that the decisions I have made are the correct ones, so people don't need options ;-)

jribbens avatar Mar 20 '23 14:03 jribbens

I'm pretty sure any of the JSON-display extensions will have issues if you install/enable more than one at once ;-)

I disabled the other extension before trying yours. Maybe I'll try disabling every extension one by one to see which is the one clashing, but I would assume it's the "Remove Cookies Banner" as that one causes issues regularly when trying other extensions.

If you file an issue at https://github.com/jribbens/json-wrangler I'll probably get around to that at some point.

I would honestly feel bad about giving you that much work for something I don't really intend on using long term, but if you really want the motivation from a raised issue, I would do it for you.

It is true that I've adopted the philosophy that the decisions I have made are the correct ones, so people don't need options ;-)

I don't get if this is meant to be sarcastic or condescending, but I assume that most people would be happy to have the theme you chose, but I generally use lighter themes.

For the extension this repo is about, for example, I use the theme "solarized light" which fits just right for me. I think that the CSS styling is overkill, but a few more options would be nice to have.

TheYuriG avatar Mar 20 '23 15:03 TheYuriG

I'm pretty sure any of the JSON-display extensions will have issues if you install/enable more than one at once ;-)

I disabled the other extension before trying yours. Maybe I'll try disabling every extension one by one to see which is the one clashing, but I would assume it's the "Remove Cookies Banner" as that one causes issues regularly when trying other extensions.

If it's something other than the fault of another extension, I'd appreciate it if you'd file an issue.

If you file an issue at https://github.com/jribbens/json-wrangler I'll probably get around to that at some point.

I would honestly feel bad about giving you that much work for something I don't really intend on using long term, but if you really want the motivation from a raised issue, I would do it for you.

It's a reasonable feature request, and programming it would probably take less time than creating a new release, so I'd probably put it out when that happens.

It is true that I've adopted the philosophy that the decisions I have made are the correct ones, so people don't need options ;-)

I don't get if this is meant to be sarcastic or condescending, but I assume that most people would be happy to have the theme you chose, but I generally use lighter themes.

For the extension this repo is about, for example, I use the theme "solarized light" which fits just right for me. I think that the CSS styling is overkill, but a few more options would be nice to have.

I would say "humorous" rather than "sarcastic", and certainly not "condescending". Adding an options system complicates the extension greatly both from my point of view as the author and from the point of view of users. I may add one someday if anyone ever discovers the extension exists and it gains any appreciable number of users ;-)

jribbens avatar Mar 20 '23 20:03 jribbens