dmackdev/egui_json_tree

Empty arrays/objects should not be expandable

Closed this issue · 2 comments

Screenshot 2023-09-06 at 11 34 40 PM

I suggest that these are not rendered as "collapsing" and don't show the ....

I think for consistency in JSON representation, empty arrays/objects should still show the collapsing icon and be expandable. I think showing [] and {} for empty arrays/objects would make sense.
Other JSON tree visualisers also follow this combined approach.
Would you like to raise a PR to remove the ... for empty arrays/objects?

Fair enough, I see that being better when there are more keys, some empty and some not.

Interestingly, Chrome mixes both representations in the JS console.
Screenshot 2023-09-07 at 8 20 46 PM

I'll make a PR with my changes