renderjson icon indicating copy to clipboard operation
renderjson copied to clipboard

truncation for too many items

Open Almenon opened this issue 7 years ago • 2 comments

It would be nice to have truncation paramater in case there are too many items. set_show_to_level is useful in this regard, but it doesn't cover cases in which there are too many items in the level that you normally want shown.

Just something like this would work:

............................. .............................. 154 items truncated +

Alternatively, you could go with the approach used in the chrome developer tools and summarize the items like so:

[ 0-100 ] + [ 100-200 ] + [ 200-300 ] + etc.... increasing the scale with the number of items.

Almenon avatar Oct 20 '17 14:10 Almenon

I tried developing this for a tiny bit. Got it sort-of working but the tabs are wonky.

see https://github.com/Almenon/renderjson/commit/cc0b12ac251d9826e289e795aa831508dbd1bdc1

Almenon avatar Jan 01 '18 02:01 Almenon

+1 This would be very useful! We have queries that can return between 1 and 100000 entries, so some control would be great!

DirkReiners avatar Mar 12 '19 16:03 DirkReiners