Skip to content

Commit

Permalink
simplify call logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bengalengel committed Jun 24, 2024
1 parent 2e6369f commit 41fa8f1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions R/utility.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ readJson <- function(x, simplifyVector = TRUE, ...) {
}

writeJson <- function(x, file, auto_unbox = TRUE, pretty = TRUE, ...) {
printingArgs <- list(...)
#for now only working with one argument to set na=null for models object
if(length(printingArgs) >= 1){
jsonlite::write_json(x, path = file, auto_unbox = auto_unbox, pretty = pretty, na = printingArgs$na)
}else{
jsonlite::write_json(x, path = file, auto_unbox = auto_unbox, pretty = pretty)
}
jsonlite::write_json(x, path = file, auto_unbox = auto_unbox, pretty = pretty, ...)
}

## Lists -----------------------------------------------------------------------
Expand Down

0 comments on commit 41fa8f1

Please sign in to comment.