repr icon indicating copy to clipboard operation
repr copied to clipboard

Add jsonLite repr

Open flying-sheep opened this issue 2 years ago • 3 comments

Fixes #146

flying-sheep avatar Mar 18 '22 09:03 flying-sheep

@robertour I couldn’t find a more complex dataframe structure that R doesn’t consider “damaged” so if you can, now is the time to get it into this PR

flying-sheep avatar Mar 18 '22 09:03 flying-sheep

do you mean something like this?

complex_example  = structure(list(`_id` = c(272538886144, 1248, 
1432432, 1496184576), createdAt = structure(c(1626034012, 
1626372704, 1631013467, 1631617963), class = c("POSIXct", "POSIXt"
)), possiblySensitive = c(FALSE, FALSE, FALSE, FALSE), source = c("http://example.com", 
"http://example.com", "http://example.com", "http://example.com"
), text = c("DUMMY", "DUMMY", "DUMMY", "DUMMY"), isRetweet = c(FALSE, 
TRUE, FALSE, FALSE), user = structure(list(id = c(42, 42, 42, 
42), name = c("who, me", "who, me", "who, me", "who, me"), screenName = c("not_me", 
"not_me", "not_me", "not_me")), row.names = c(NA, 4L), class = "data.frame"), 
    deleted = c(0L, 0L, 0L, 0L), `user$id` = c(2, 2, 2, 2)), row.names = c(NA, 
-4L), class = c("tbl_df", "tbl", "data.frame"))

this is base on the data that I was using, but anonymized

robertour avatar Mar 18 '22 14:03 robertour

Nice! Yeah, it should work now, but it’s not very pretty.

I’d have to rework a lot to make nested dataframes be displayed semantically

flying-sheep avatar Mar 20 '22 10:03 flying-sheep