JSon-Editor icon indicating copy to clipboard operation
JSon-Editor copied to clipboard

How to remove unwanted items like ( {object} , [Array]) from displaying on the UI

Open rohithsantosh13 opened this issue 2 years ago • 3 comments

@zetoken How remove the excess items like {object} [Array] from treeview. like shown in the window to the right in the image. image

rohithsantosh13 avatar Feb 15 '23 07:02 rohithsantosh13

When a json value is something like [ { key:"value" }, { key:"value" }, ...], it is read as an array of objects. The tree view of Json Editor is built to show the detailed structure of the format; that's why the type of each value of the example array is shown before the value. Using the type is also valuable when mixed types are used in an array.

Elementary types (strings, numbers, ...) aren't shown by their type because they're basic (design choice for readability of final values).

The root of the file is itself shown by its type because a json data (json.org) may be an object (your case) but may also be an array.

Then the answer to your question is "you can't" using this software. I would study any pull request allowing an alternative visualization of the data.

zetoken avatar Feb 15 '23 08:02 zetoken

@zetoken Thanks for the quick reply. If I'm not wrong, are you saying it's not possible to remove those items due to the logic of the software, or it's not possible at all?

rohithsantosh13 avatar Feb 15 '23 08:02 rohithsantosh13

It is possible to implement a new visualization tree. Now, I'm not sure how difficult the update of the edition logic would be for such a tree.

zetoken avatar Feb 15 '23 09:02 zetoken