gitlabr icon indicating copy to clipboard operation
gitlabr copied to clipboard

Change way to handle JSON outputs

Open statnmap opened this issue 3 years ago • 0 comments

Why?

  • Nested lists are difficult to handle automatically

Linked to #51 What?

  • A proposition to only handle the first level, the user will have to handle himself sub-lists.

  • This will be a breaking change when implemented !

  • [ ] Need to verify that main object is indeed a list, named list, in case, we want to retrieve a sub-element

workitem_tbl <- multilist_to_tibble(workitem)
wifields <- multilist_to_tibble(workitem_tbl$fields[[1]]) # << 
names(wifields)
wifields$System.State

# Otherwise
> wifields <- multilist_to_tibble(workitem_tbl$fields)
Error in `vec_cbind()`:
! Names can't be empty.
✖ Empty name found at location 1.
Run `rlang::last_error()` to see where the error occurred.

statnmap avatar Jun 15 '22 10:06 statnmap