gildas-lormeau / JSONVue

Fork of JSONView for Chromium-based browsers

Home Page:https://chrome.google.com/webstore/detail/chklaanhfefbnpoihckbnefhakgolnmc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not expand arrays if it would fit on the screen.

axos88 opened this issue · comments

Arrays, if they only contain values, and fit in a single line should not be broken up.

This:

{
202: {
0: "12",
1: "0",
4: "0",
10: "0",
13: "0",
21: "110",
25: "200",
26: "0",
35: [
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
1,
0,
0,
0,
0
],
37: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
68: "237",
82: "40"
},
204: {
1: "28",
10: [
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
255: { },
timestamp: "Fri Feb 13 10:15:11 2015"
}

Should instead be this:

{
202: {
0: "12",
1: "0",
4: "0",
10: "0",
13: "0",
21: "110",
25: "200",
26: "0",
35: [0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0],
37: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
68: "237",
82: "40"
},
204: {
1: "28",
10: [0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0]
},
255: { },
timestamp: "Fri Feb 13 10:15:11 2015"
}

Also when an element is collapsed, i'd expect to see at least the first 50-80 characters before ...